Hi!
When I write BLOB to my consumer database then I get ORA-24813.
In this case I used clause 'direct=true', but if I used 'direct=false' then all were ok.
My customer have:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production With the Partitioning, Real Application Clusters, Data Mining and Real Application Testing options
My testing database (there are all is ok):
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production With the Partitioning, OLAP and Data Mining options
What can I do? (my company 'very' prefere direct connection without 'huge' Oracle Client).
Have a nice day, Pavel
Ps:
Oracle error description:
ORA-24813 cannot send or receive an unsupported LOB
Cause
An attempt was made to send a LOB across the network, but either the server does not support the LOB sent by the client, or the client does not support the LOB sent by the server. This error usually occurs when the client and server are running different versions of Oracle.
ORA-24813 cannot send or receive an unsupported LOB
Crazy solving
I try to many switches and.... tram ta da da!
If I added 'unicode=false' to connection string then all's ok, but there is only overkill...
If I added 'unicode=false' to connection string then all's ok, but there is only overkill...
Does that solution suit you? If no, try to set
in your code. Please let us know about the results.
Code: Select all
OracleUtils.UseDirectLobs=false
I tested obsolete 'UseDirectLobs' and the problem continues
There I identified the problem:
(I suppose, that the byte array can be the problem...)
Hi, PaRi
public override void Save()
{
OracleCommand command;
command = new OracleCommand("UPDATE gag_application SET icon=:icon WHERE id=:id", GAGPersistor.Persistor.Connection);
try
{
command.Parameters.AddWithValue(":id", Id);
command.Parameters.AddWithValue(":icon", ImageToByteArray(Icon));
command.ExecuteScalar();
}
catch
{
command.Dispose();
throw;
}
}
private byte[] ImageToByteArray(Icon icon)
{
MemoryStream stream = new MemoryStream();
icon.Save(stream);
return stream.ToArray();
}
(I suppose, that the byte array can be the problem...)
Hi, PaRi
public override void Save()
{
OracleCommand command;
command = new OracleCommand("UPDATE gag_application SET icon=:icon WHERE id=:id", GAGPersistor.Persistor.Connection);
try
{
command.Parameters.AddWithValue(":id", Id);
command.Parameters.AddWithValue(":icon", ImageToByteArray(Icon));
command.ExecuteScalar();
}
catch
{
command.Dispose();
throw;
}
}
private byte[] ImageToByteArray(Icon icon)
{
MemoryStream stream = new MemoryStream();
icon.Save(stream);
return stream.ToArray();
}