Deceptive Error

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
RabbitHunter
Posts: 1
Joined: Thu 24 Apr 2014 15:10

Deceptive Error

Post by RabbitHunter » 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.

Pinturiccio
Devart Team
Posts: 2141
Joined: Wed 02 Nov 2011 09:44

Re: Deceptive Error

Post by Pinturiccio » Tue 29 Apr 2014 14:00

The information you have provided is not enough for reproducing the issue. Please describe how your program works in more details. If possible, please create and send us a small test project with the corresponding DDL/DML scripts for reproducing the issue.
RabbitHunter wrote:the length specified (in this case 36)
Please tell us whether 36 is:
1. The column length. Tell us the type and size of the column in this case. For example, VARCHAR2(36 BYTE), VARCHAR2(36 CHAR) or NCHAR(36) or something different.
2. OracleParameter.Size.

Post Reply