Mono 不支持 SQL Server 时间戳列?
我正在尝试使用 Mono 在 Linux 中运行 .NET 命令行应用程序。它访问 SQL Server 2005 Express 数据库,并在查询某些数据时抛出以下异常:
System.NotSupportedException: Unknown Type : timestamp
at Mono.Data.Tds.TdsMetaParameter.GetMetaType () [0x00000]
at Mono.Data.Tds.Protocol.Tds70.WriteParameterInfo (Mono.Data.Tds.TdsMetaParameter param) [0x00000]
at Mono.Data.Tds.Protocol.Tds70.ExecRPC (System.String rpcName, Mono.Data.Tds.TdsMetaParameterCollection parameters, Int32 timeout, Boolean wantResults) [0x00000]
at Mono.Data.Tds.Protocol.Tds70.ExecProc (System.String commandText, Mono.Data.Tds.TdsMetaParameterCollection parameters, Int32 timeout, Boolean wantResults) [0x00000]
at System.Data.SqlClient.SqlCommand.Execute (Boolean wantResults) [0x00000]
at System.Data.SqlClient.SqlCommand.ExecuteReader (CommandBehavior behavior) [0x00000]
查询的表有一个 RowVersion
列,其类型为 timestamp
。在 Mono 中运行 .NET 应用程序时,是否可以在 SQL Server 中使用时间戳列?
I am trying to run a .NET command line application in Linux using Mono. It accesses SQL Server 2005 Express database and, when querying some data it throws the following exception:
System.NotSupportedException: Unknown Type : timestamp
at Mono.Data.Tds.TdsMetaParameter.GetMetaType () [0x00000]
at Mono.Data.Tds.Protocol.Tds70.WriteParameterInfo (Mono.Data.Tds.TdsMetaParameter param) [0x00000]
at Mono.Data.Tds.Protocol.Tds70.ExecRPC (System.String rpcName, Mono.Data.Tds.TdsMetaParameterCollection parameters, Int32 timeout, Boolean wantResults) [0x00000]
at Mono.Data.Tds.Protocol.Tds70.ExecProc (System.String commandText, Mono.Data.Tds.TdsMetaParameterCollection parameters, Int32 timeout, Boolean wantResults) [0x00000]
at System.Data.SqlClient.SqlCommand.Execute (Boolean wantResults) [0x00000]
at System.Data.SqlClient.SqlCommand.ExecuteReader (CommandBehavior behavior) [0x00000]
Queried table has a RowVersion
column whose type is timestamp
. Isn't it possible to use timestamp columns in SQL Server when running .NET applications in Mono?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通过 MoMA(Mono 迁移分析器)运行您的应用程序。它应该告诉您 Mono 支持和不支持什么。
更新:
查看了源代码,其中抛出此问题(
GetMeteType
,从第 334 行开始),实际上timestamp
是类型列表中缺失。提出错误。
Run your application through MoMA (Mono Migration Analyzer). It should tell you what is and isn't supported by Mono.
Update:
Took a look at the source code, where this is thrown (
GetMeteType
, starting on line 334), and indeedtimestamp
is missing from the list of types.Raise a bug.