ORA-22275: invalid LOB locator specified

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
AlexPA
Posts: 1
Joined: Mon 25 Jul 2011 07:00

ORA-22275: invalid LOB locator specified

Post by AlexPA » Mon 25 Jul 2011 07:08

Hi,

I am getting (ORA-22275: invalid LOB locator specified) error when execute the follwing code:

/*
CREATE TABLE CLOB_TEST_TABLE (
ID NUMBER(12),
BINARY_DATA BLOB
)
*/
string connectionString = "DATA SOURCE=MYDB;PERSIST SECURITY INFO=True;USER ID=USR;PASSWORD=PWD";
using (OracleConnection connection = new OracleConnection(connectionString))
{
connection.Open();
OracleLob lob = new OracleLob(connection, OracleDbType.Blob);
byte[] buffer = { 1, 3, 4 };
lob.Write(buffer, 0, buffer.Length);
OracleCommand command = new OracleCommand(
"INSERT INTO CLOB_TEST_TABLE (ID, BINARY_DATA) VALUES(1, :B_DATA)", connection);
OracleParameter param = command.Parameters.Add("B_DATA", OracleDbType.Blob);
param.OracleValue = lob;
Console.WriteLine(command.ExecuteNonQuery() + " rows affected.");
}

Console.ReadKey();

Oracle version is 10.

Please help

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Wed 27 Jul 2011 08:12

I cannot reproduce the problem with the latest (6.30.185) version of dotConnect for Oracle. Please try 6.30.185 and notify us about the results.

A similar issue was discussed at http://www.devart.com/forums/viewtopic.php?t=20100.

Post Reply