[英]System.Dbtype for a DB2 Timestamp value
I have an internal library which has an API to call DB2 Stored Procs. 我有一个内部库,该库具有一个用于调用DB2存储过程的API。 As part of the parameter binding, the syntax is:
作为参数绑定的一部分,语法为:
SPParameter(string paramName, DbType dbType, object paramValue)
One of the input params of the Stored Proc is of the type Timestamp. Stored Proc的输入参数之一是Timestamp类型。 I am unable to find a
System.DbType
enum which will work in this case. 我找不到在这种情况下可以使用的
System.DbType
枚举。 The possible enums and the error i get are: 可能的枚举和我得到的错误是:
Date: Error in DB Write: ERROR [42884] [IBM][DB2/LINUXX8664] SQL0440N
DateTime: Error in DB Write: ERROR [42884] [IBM][DB2/LINUXX8664] SQL0440N
DateTime2: Error in DB Write: No mapping exists from DbType DateTime2 to a known DB2Type.
Time: Error in DB Write: ERROR [42884] [IBM][DB2/LINUXX8664] SQL0440N
Any suggestions on which enum to use?any other approach? 对使用哪个枚举有任何建议吗?
SQL0440N表示您尝试调用的过程不存在,因此我怀疑四分之三的错误不在您使用的数据类型中。
I found the issue was in the order of Params i was entering. 我发现问题出在我输入的Params中。 Even though I name the Params, it is required for them to be in order in which they are defined in the Stored Proc.
即使我命名了Params,也要求它们在存储过程中的定义顺序必须一致。 Correcting the order solved the issue
更正订单解决了问题
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.