Deceptive Error
Posted: Thu 24 Apr 2014 15:17
Hello,
I have an application that synchronizes data from a Pervasive database to an Oracle database. When running the application and transferring data for a specific vendor, I would get the following error message:
ERROR:
ORA-01461: can bind a LONG value only for insert into a LONG column
at Devart.Data.Oracle.bp.d()
at Devart.Data.Oracle.b0.f()
at Devart.Data.Oracle.b0.c()
at Devart.Data.Oracle.i.a(Int32 A_0, bx A_1)
at Devart.Data.Oracle.OracleCommand.InternalExecute(CommandBehavior behavior, IDisposable disposable, Int32 startRecord, Int32 maxRecords, Boolean nonQuery)
at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior, Boolean nonQuery)
at Devart.Data.Oracle.OracleCommand.ExecuteNonQuery()
The problem was actually caused by adding a value to a character parameter that was longer than the length specified (in this case 36). After trimming the input data to the proper length, the error was fixed.
However; the error message as listed above caused me to spend time looking at my NUMERIC fields and the corresponding parameters for the insert.
I have an application that synchronizes data from a Pervasive database to an Oracle database. When running the application and transferring data for a specific vendor, I would get the following error message:
ERROR:
ORA-01461: can bind a LONG value only for insert into a LONG column
at Devart.Data.Oracle.bp.d()
at Devart.Data.Oracle.b0.f()
at Devart.Data.Oracle.b0.c()
at Devart.Data.Oracle.i.a(Int32 A_0, bx A_1)
at Devart.Data.Oracle.OracleCommand.InternalExecute(CommandBehavior behavior, IDisposable disposable, Int32 startRecord, Int32 maxRecords, Boolean nonQuery)
at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior, Boolean nonQuery)
at Devart.Data.Oracle.OracleCommand.ExecuteNonQuery()
The problem was actually caused by adding a value to a character parameter that was longer than the length specified (in this case 36). After trimming the input data to the proper length, the error was fixed.
However; the error message as listed above caused me to spend time looking at my NUMERIC fields and the corresponding parameters for the insert.