Can not insert BLOB

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
ekarasu
Posts: 15
Joined: Wed 01 Feb 2006 05:56

Can not insert BLOB

Post by ekarasu » Thu 01 Jun 2006 13:36

Hi, I am using the following code to insert a byte[] to a blob field.
But I get a message like "ORA-00600: internal error code, arguments: [12259], [], [], [], [], [], [], []" while executing the command.

The code is as follows

CoreLab.Oracle.OracleCommand SQLCommand = new CoreLab.Oracle.OracleCommand();

SQLCommand .Connection = DBConnection;

SQLCommand .Parameters.Add("Dos", OracleDbType.Blob);
SQLCommand .Parameters["Dos"].Value = Value;

SQLCommand .CommandText = "INSERT INTO TableName (Dos) VALUES (:Dos)";

SQLCommand .ExecuteNonQuery();

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Thu 01 Jun 2006 14:32

Please refer to "Working with BLOB and CLOB Data" article of OraDirect .NET help documentation.

ekarasu
Posts: 15
Joined: Wed 01 Feb 2006 05:56

Post by ekarasu » Thu 01 Jun 2006 14:53

We looked at "Working with BLOB and CLOB Data" help and tried the same example present there with Lob, but received a similar error while writing to Lob.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Thu 01 Jun 2006 15:05

Don't you use Direct=true mode?

ekarasu
Posts: 15
Joined: Wed 01 Feb 2006 05:56

Post by ekarasu » Thu 01 Jun 2006 18:40

Yes, we are using Direct=true and Connection Lifetime=0

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Fri 02 Jun 2006 07:24

What type of the field do you have? What is database charset?
Please send us small test project if possible to reproduce the problem; include definition of your own database objects. Do not use third party components.

ekarasu
Posts: 15
Joined: Wed 01 Feb 2006 05:56

Post by ekarasu » Fri 02 Jun 2006 08:00

We omitted Direct=true in connection string and now it is working. I think with this step, we made Direct=false (if it is default). Could we encounter a problem in the future with this? (If there is going to be a problem, I can send you a small test project?)

Paul
Posts: 725
Joined: Thu 28 Oct 2004 14:06

Post by Paul » Fri 02 Jun 2006 08:31

You can encounter this problem in Direct mode if you try to insert BLOB value to the LONG field, or it may be a problem of OraDirect .NET with particular Oracle server. Please specify the version of Oracle server, database charset. Possibly this depends on inserting data. If it is a problem of OraDirect .NET we will fix this.

ekarasu
Posts: 15
Joined: Wed 01 Feb 2006 05:56

Post by ekarasu » Fri 02 Jun 2006 08:41

We are using Oracle 10g Express edition with Turkish charset.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Fri 02 Jun 2006 11:03

Send us a small test project.

ekarasu
Posts: 15
Joined: Wed 01 Feb 2006 05:56

Post by ekarasu » Fri 02 Jun 2006 11:31

We sent it to [email protected].

Post Reply