Home All Groups Group Topic Archive Search About

Unable to insert BLOB in Oracle

Author
30 Jan 2006 11:23 PM
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

Author
31 Jan 2006 3:51 AM
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."
Author
3 Mar 2006 2:16 AM
GautamKumar
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








Show quote
"Kevin Yu [MSFT]" wrote:

> 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."
>
>
Author
3 Mar 2006 2:18 AM
GautamKumar
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

Show quote
"Kevin Yu [MSFT]" wrote:

> 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."
>
>

AddThis Social Bookmark Button