Unable to insert BLOB in Oracle


B

Bala Nagarajan

Hello,
I am unable to insert BLOB objects into Oracle 9i database from .NET. I
get the following exception:

"ORA-01460: unimplemented or unreasonable conversion requested".

I have a table in the database that accepts a number and blob object.
The blob object i am trying to insert is a compressed dataset.

Every thing seems to work fine if i insert small amount of data (compressing
around 500 records) but i get an exception
if i try to store data that has more than 500 records compressed.



Any ideas as to why this may happen?

Thanks

Bala
 
Ad

Advertisements

K

Kevin Yu [MSFT]

Hi Bala,

You can try to check if the type of the insert parameters are set properly.
Also, are the size of them correct? If they are correct, could you please
post the code and SQL stataments that update database here?

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
G

Guest

Hi Kevin,

I am also having the same problem of inserting > than 32KB of data.This is
the sample code i am posting:

Command Cmd = new Orchestra.DataAccess.Command();
FileInfo fi=new
FileInfo(@"C:\MyData\Old_Gautam_data\BLR-WS-119\songs\telugu\movies\letsc.txt");
StreamReader sr=new StreamReader(fi.FullName);
string tempbuff=sr.ReadToEnd();
MessageBox.Show(sr.BaseStream.Length.ToString(),"length");
Cmd.CommandString="procT";
Cmd.CommandType=CommandType.StoredProcedure;
Cmd.AddParameter("inxml",tempbuff,ParameterDirection.Input,OracleType.Clob,(int)sr.BaseStream.Length);
sr.Close();
Cmd .ExecuteNonQuery(-1,Cmd);

Thanks
GautamKumar
 
Ad

Advertisements

G

Guest

i also have the same problem this is the sample code::

Command Cmd = new Orchestra.DataAccess.Command();

FileInfo fi=new
FileInfo(@"C:\MyData\Old_Gautam_data\BLR-WS-119\songs\telugu\movies\letsc.txt");
StreamReader sr=new StreamReader(fi.FullName);
string tempbuff=sr.ReadToEnd();
MessageBox.Show(sr.BaseStream.Length.ToString(),"length");
Cmd.CommandString="procT";
Cmd.CommandType=CommandType.StoredProcedure;
Cmd.AddParameter("inxml",tempbuff,ParameterDirection.Input,OracleType.Clob,(int)sr.BaseStream.Length);
sr.Close();
Cmd .ExecuteNonQuery(-1,Cmd);


Thanks
Gautam
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top