Oracle Blob
-
[email protected]
- Posts: 6
- Joined: Mon 05 Mar 2012 18:27
Oracle Blob
I have tried everything I can think of to update a remote oracle database's
blob field.
Connection string is:
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=XXXXX.STL.MO.BOEING.COM)(PORT=1521))(CONNECT_DATA=(SID=XXXXX)))
The below code works if the blob size is small. When it is big 4.6M I get an
ORA-01460: unimplemented or unreasonable conversion requested.
Any idea how to make this work?
Thanks!
Marshall Watts
[email protected]
l_cStream = new TMemoryStream;
l_cStream->LoadFromFile( Helper->m_cAttachments[ i ]->m_aFilename );
OraQuery->SQL->Clear();
OraQuery->SQL->Add( "insert into Parts_Owner.P_ORDERS_ATTCHMNTS_YG5D3A9K_VW ( attachment_id, attachment_name, attachment, app_id )" );
OraQuery->SQL->Add( " values( :attachment_id, :attachment_name, :attachment, :app_id )" );
OraQuery->SQL->Add( " returning attachment_id INTO :attachment_id" );
OraQuery->Params->Items[0]->Value = "";
OraQuery->Params->Items[1]->Value = ExtractFileName( Helper->m_cAttachments[ i ]->m_aFilename );
OraQuery->Params->Items[2]->ParamType = ptInput;
OraQuery->Params->Items[2]->SetBlobData( l_cStream->Memory, (int)l_cStream->Size );
OraQuery->Params->Items[3]->AsString = "YG5D3A9K";
OraQuery->ExecSQL();
Helper->m_cAttachments[ i ]->m_iAttachmentID = OraQuery->ParamByName( "attachment_id" )->AsInteger;
delete l_cStream;
blob field.
Connection string is:
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=XXXXX.STL.MO.BOEING.COM)(PORT=1521))(CONNECT_DATA=(SID=XXXXX)))
The below code works if the blob size is small. When it is big 4.6M I get an
ORA-01460: unimplemented or unreasonable conversion requested.
Any idea how to make this work?
Thanks!
Marshall Watts
[email protected]
l_cStream = new TMemoryStream;
l_cStream->LoadFromFile( Helper->m_cAttachments[ i ]->m_aFilename );
OraQuery->SQL->Clear();
OraQuery->SQL->Add( "insert into Parts_Owner.P_ORDERS_ATTCHMNTS_YG5D3A9K_VW ( attachment_id, attachment_name, attachment, app_id )" );
OraQuery->SQL->Add( " values( :attachment_id, :attachment_name, :attachment, :app_id )" );
OraQuery->SQL->Add( " returning attachment_id INTO :attachment_id" );
OraQuery->Params->Items[0]->Value = "";
OraQuery->Params->Items[1]->Value = ExtractFileName( Helper->m_cAttachments[ i ]->m_aFilename );
OraQuery->Params->Items[2]->ParamType = ptInput;
OraQuery->Params->Items[2]->SetBlobData( l_cStream->Memory, (int)l_cStream->Size );
OraQuery->Params->Items[3]->AsString = "YG5D3A9K";
OraQuery->ExecSQL();
Helper->m_cAttachments[ i ]->m_iAttachmentID = OraQuery->ParamByName( "attachment_id" )->AsInteger;
delete l_cStream;
-
[email protected]
- Posts: 6
- Joined: Mon 05 Mar 2012 18:27
I would if I could but I don't have a subscription at this time to update. That's why I wanted to see if I'm doing something wrong and could make it work with what I have.AlexP wrote:Hello,
You are using a rather old version of ODAC, try to install the latest ODAC version (ODAC 8.1.5), and if the error persists, please send us a script to create the table.
Thanks,
Marshall
Hello,
We have checked your code both on the current ODAC version and on yours, and data is pasted correctly. Please specify the exact Oracle client and server version, and provide a script for creating tables.
P.S. Even if your subscription elapsed , you can download the latest ODAC trial version and check this problem on it. (http://www.devart.com/odac/download.html)
We have checked your code both on the current ODAC version and on yours, and data is pasted correctly. Please specify the exact Oracle client and server version, and provide a script for creating tables.
P.S. Even if your subscription elapsed , you can download the latest ODAC trial version and check this problem on it. (http://www.devart.com/odac/download.html)
-
[email protected]
- Posts: 6
- Joined: Mon 05 Mar 2012 18:27
The server is 11.1.0.6.0 and my client is 9iR2
The DBMonitor shows the correct info being passed:
Name Type Data Type In Value
attachment_id VARCHAR[0]
attachment_name VARCHAR[16] '5Idiots_0002.wmv'
attachment IN BLOB
app_id VARCHAR[8] 'YG5D3A99'
The table is
CREATE TABLE PARTS_OWNER.PARTS_ORDERS_ATTACHMENTS (
ATTACHMENT_ID NUMBER NOT NULL,
ATTACHMENT_NAME VARCHAR2(80) NOT NULL,
ATTACHMENT BLOB
APP_ID VARCHAR2(80) NOT NULL
}
PS
I did renew my license but I don't know how to get the latest code!!![/img]
The DBMonitor shows the correct info being passed:
Name Type Data Type In Value
attachment_id VARCHAR[0]
attachment_name VARCHAR[16] '5Idiots_0002.wmv'
attachment IN BLOB
app_id VARCHAR[8] 'YG5D3A99'
The table is
CREATE TABLE PARTS_OWNER.PARTS_ORDERS_ATTACHMENTS (
ATTACHMENT_ID NUMBER NOT NULL,
ATTACHMENT_NAME VARCHAR2(80) NOT NULL,
ATTACHMENT BLOB
APP_ID VARCHAR2(80) NOT NULL
}
PS
I did renew my license but I don't know how to get the latest code!!![/img]
Hello,
We have checked the BLOB data loading on the Oracle client and server versions that you have specified, and we couldn't reproduce the problem.
Maybe, you have triggers that modify the data before pasting it into the table.
P.S. You can download the latest version of ODAC at secure*devart*com using the credentials you got when buying the license.
We have checked the BLOB data loading on the Oracle client and server versions that you have specified, and we couldn't reproduce the problem.
Maybe, you have triggers that modify the data before pasting it into the table.
P.S. You can download the latest version of ODAC at secure*devart*com using the credentials you got when buying the license.
-
[email protected]
- Posts: 6
- Joined: Mon 05 Mar 2012 18:27
HELP!!!
I'm having a hard time getting to my upgrade! I paid for an upgraded to my ODAC package. I don't know how I registered the package (username/password) and I'm unable to reteive my updated version. I need help!! Is there something in my currently installed package that would tell you what you need to know to help me get into the secure site to get my upgrade? Is there anything else I could provide that would help? I need this info for a project I'm working on.
Thanks
Marshall
Thanks
Marshall
-
[email protected]
- Posts: 6
- Joined: Mon 05 Mar 2012 18:27
Re: HELP!!!
Please specify your order number to check if your license has already been updated.[email protected] wrote:I'm having a hard time getting to my upgrade! I paid for an upgraded to my ODAC package.
Regards,
Devart Support