[英]Is there a way to specify the Date Format used with SQLServer Management Object Scripting
當我為我的項目生成數據庫腳本時,我想管理在 SQLScript 的注釋中使用的日期格式。
我將我的區域設置設置為澳大利亞格式,但它們似乎被忽略了。
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
結果腳本中的注釋如下所示...請注意日期采用美國格式。
/****** Object: Table [dbo].[AAAExampleData] Script Date: 06/17/2009 10:08:38 ******/
SET ANSI_NULLS ON
我知道評論只是為了便於閱讀,但我想完全控制我的 output。
如果不可能,請直說。
我建議您將此作為錯誤報告給 Microsoft: http://connect.microsoft.com/sqlserver/ 。 先搜索看看有沒有人舉報過這個。 很可能不是說英語的人已經報告了這一點; 你只是想改變字段的順序,其他人需要改變語言和字符集!
輸入錯誤報告后,請編輯您的問題以包含指向它的鏈接。 我們感興趣的各方可以對您的錯誤報告進行投票。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.