When I'm generating my database scripts for my project I'd like to manage the date format that is used in the comments in the SQLScript.
I have my regional settings set to Australian format, but they seem to be disregarded.
Imports Microsoft.SqlServer.Management
...
Dim scr As Smo.Scripter
Dim opt As Smo.ScriptingOptions
...
opt = New Smo.ScriptingOptions
opt.???? = //Is there something that I can set to control the date?
opt.Encoding = Encoding.ASCII
opt.DriAll = True
opt.ClusteredIndexes = True
opt.Default = True
opt.Indexes = True
opt.IncludeHeaders = True
opt.AppendToFile = True
Results in a script with comments that look like this... Note the date is in US Format.
/****** Object: Table [dbo].[AAAExampleData] Script Date: 06/17/2009 10:08:38 ******/
SET ANSI_NULLS ON
I know that the Comments are only for readability, but I'd like complete control over my output.
If it's not possible, please just say that.
I recommend that you report this to Microsoft as a bug: http://connect.microsoft.com/sqlserver/ . Search first to see if someone else has reported this. It's likely that someone who is not an English speaker will have reported this; you're only looking to change the order of fields, others need the language and character set to change!
Once you've entered a bug report, please edit your question to include a link to it. That we, interested parties can vote on your bug report.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.