[英]Oracle NUMBER(20) corresponding c# type?
What is the corresponding C# type for an Oracle NUMBER(20)? Oracle NUMBER(20)的相应C#类型是什么? Oracle version is 8.
Oracle版本是8。
Update: 更新:
This is insert query. 这是插入查询。 Then try adding the following parameter to command:
然后尝试将以下参数添加到命令:
IDbDataParameter idParameter = cmd.CreateParameter();
idParameter.DbType = DbType.Int64;
idParameter.Value = id;
cmd.Parameters.Add(idParameter);
Oracle gives me exception: System.Data.Odbc.OdbcException: ERROR [22007] [Microsoft][ODBC driver for Oracle][Oracle]ORA-01840: input value not long enough for date format Oracle给我异常:System.Data.Odbc.OdbcException:ERROR [22007] [Microsoft] [Oracle的ODBC驱动程序] [Oracle] ORA-01840:输入值不够长,不适合日期格式
Are you using a GetInt32() method to read the Data? 您是否使用GetInt32()方法来读取数据? Try Using GetDecimal() instead.
请尝试使用GetDecimal()。
the error message ORA-01840: input value not long enough for date format
is not a datatype mapping error. 错误消息
ORA-01840: input value not long enough for date format
不是数据类型映射错误。 This is the kind of error you get when Oracle fails a TO_DATE
in some cases such as: 这是Oracle在某些情况下失败
TO_DATE
时遇到的错误,例如:
SQL> SELECT to_date('0101', 'ddmmyyyy') FROM dual;
ORA-01840: input value not long enough for date format
I would look into your SQL query / PLSQL block for such an error. 我会查看您的SQL查询/ PLSQL块以查找此类错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.