oradirect3 (for 1.1) bug2 : cant receive BLOB via proc

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
expas
Posts: 14
Joined: Wed 11 May 2005 00:09

oradirect3 (for 1.1) bug2 : cant receive BLOB via proc

Post by expas » Tue 14 Jun 2005 04:20

we have table t_testblob with two fields: [blb] of type BLOB with any content (simple string for example) and [id] number :)

Oracle proc:

Code: Select all

create or replace procedure test_blob(p_blb out blob)
is
begin
  SELECT blb INTO p_blb FROM t_testblob b
	WHERE b.id = 1;
  EXCEPTION
 	WHEN OTHERS THEN
		p_blb := NULL;
end test_blob;
code in dotnet:

Code: Select all

OracleCommand cmd = new OracleCommand("test_blob", (OracleConnection)_cnn);
cmd.CommandType = CommandType.StoredProcedure;
OracleParameter p = new OracleParameter("blb", OracleDbType.Blob);
p.Direction = ParameterDirection.Output;
cmd.Parameters.Add(p);

cmd.ExecuteNonQuery();
byte[] lob0 = (byte[])cmd.Parameters["blb"].Value;
it crash on cmd.ExecuteNonQuery() with message:
An unhandled exception of type 'System.InvalidCastException' occurred in corelab.oracle.dll

Additional information: Specified cast is not valid.
(if try receive BLOB via simple select all work, but via proc it dosnt work)

Oleg
Devart Team
Posts: 264
Joined: Thu 28 Oct 2004 13:56

Post by Oleg » Fri 17 Jun 2005 13:25

We reproduced your problems and now we are working on solving them.
These fixes will be included in the next build that will be in a week.
Please see announcements at the forum to get know when a new build is released.

Post Reply