I having a problem with loading a blob into a table using Borland C++ Builder 5. I am using Oracle 8.1.7
This is failing at the Loadit->Prepare() statement with the following message:
EOracleError with message 'ORA-01009: missing mandatory parameter'
Any idea what is wrong?
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Graphics::TBitmap *tempbmp = new Graphics::TBitmap();
Oracle::TOracleDirectPathLoader *Loadit = new TOracleDirectPathLoader(this);
/*
CREATE TABLE dlr_area_ptrace (
2 session_id VARCHAR2(5),
3 system_id VARCHAR2(10),
4 ptrace BLOB
5 );
*/
long size;
OracleSession1->Connected = true;
tempbmp -> LoadFromFile("c:\\ptrace.bmp");
size = (tempbmp->Height * tempbmp->Width)/320;
Loadit->BufferSize = size * 1024;
ShowMessage(Loadit->BufferSize);
Loadit->TableName = "dlr_area_ptrace";
Loadit->Session = OracleSession1;
Loadit->GetDefaultColumns(true);
Loadit->Prepare();
char systemid[11];
char sessionid[6];
strcpy(systemid,"0000000234");
strcpy(sessionid,"1234");
Loadit->ColumnByName("session_id")->SetData(0,sessionid,4);
Loadit->ColumnByName("system_id")->SetData(0,systemid,10);
Loadit->ColumnByName("ptrace")->SetData(0,tempbmp,size);
Loadit->Load(0);
Loadit->Finish();
delete tempbmp;
delete Loadit;
OracleSession1->Connected = false;
}
//---------------------
------------------
Fair Bits...
Felix A. Hernandez
This is failing at the Loadit->Prepare() statement with the following message:
EOracleError with message 'ORA-01009: missing mandatory parameter'
Any idea what is wrong?
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Graphics::TBitmap *tempbmp = new Graphics::TBitmap();
Oracle::TOracleDirectPathLoader *Loadit = new TOracleDirectPathLoader(this);
/*
CREATE TABLE dlr_area_ptrace (
2 session_id VARCHAR2(5),
3 system_id VARCHAR2(10),
4 ptrace BLOB
5 );
*/
long size;
OracleSession1->Connected = true;
tempbmp -> LoadFromFile("c:\\ptrace.bmp");
size = (tempbmp->Height * tempbmp->Width)/320;
Loadit->BufferSize = size * 1024;
ShowMessage(Loadit->BufferSize);
Loadit->TableName = "dlr_area_ptrace";
Loadit->Session = OracleSession1;
Loadit->GetDefaultColumns(true);
Loadit->Prepare();
char systemid[11];
char sessionid[6];
strcpy(systemid,"0000000234");
strcpy(sessionid,"1234");
Loadit->ColumnByName("session_id")->SetData(0,sessionid,4);
Loadit->ColumnByName("system_id")->SetData(0,systemid,10);
Loadit->ColumnByName("ptrace")->SetData(0,tempbmp,size);
Loadit->Load(0);
Loadit->Finish();
delete tempbmp;
delete Loadit;
OracleSession1->Connected = false;
}
//---------------------
------------------
Fair Bits...
Felix A. Hernandez