Hi all,
I have this problem, when connect some clients in my server application.
My OPEN_CURSORS parameter in Oracle, is set to 300 but, when 10 +/- clients connect, this error is returned.
I have one TOraSession, 3 TOraQuery and 1 TOraStoreProc.
My ODAC Version is 5.50 for Delphi 7
When use BDE components, in my server application, this error no occur.
Thank you for all....
ORA-01000: maximum open cursors exceeded
-
- Posts: 1
- Joined: Mon 24 Oct 2005 17:11
Hello!
The following method is called for each insertion of raster data in my application.
I have the Oracle Error "ORA-01000 - Maximum open cursors exceeded" when the number of calls is bigger that OPEN_CURSORS value, like the bug relates. What is wrong in this code? When do I commit the insertion to close the opened cursor, and how?
I tried to put the following line codes after execute the line "RasterBlock_OraQuery->ExecSQL()", without success:
1) RasterBlock_OraQuery->CommitUpdates();
2) Oracle8Session->Commit();
3) OraBlob->Commit();
4) RasterBlock_OraQuery->ApplyUpdates();
5) Oracle8Session->ApplyUpdates();
void TSpatialInformation::InsertRaster( AnsiString id, unsigned char *buf )
{
AnsiString sql = "INSERT INTO SPATIAL_INFORMATION (BLOCK_ID, SPATIAL_DATA) ";
sql += " VALUES (:Block_Id, :Spatial_Data)";
RasterBlock_OraQuery->SQL->Clear();
RasterBlock_OraQuery->SQL->Add(sql);
RasterBlock_OraQuery->ParamByName("BLOCK_ID")->AsString = id;
AnsiString bufS((char *)buf);
TOraLob *OraBlob = new TOraLob(Oracle8Session->OCISvcCtx);
OraBlob->CreateTemporary(ltBlob);
OraBlob->AsString = bufS;
OraBlob->WriteLob();
RasterBlock_OraQuery->ParamByName("SPATIAL_DATA")->ParamType = ptInput;
RasterBlock_OraQuery->ParamByName("SPATIAL_DATA")->AsOraBlob = OraBlob;
RasterBlock_OraQuery->ExecSQL();
OraBlob->FreeLob();
//delete OraBlob;
}
Thanks!
Rodrigo
The following method is called for each insertion of raster data in my application.
I have the Oracle Error "ORA-01000 - Maximum open cursors exceeded" when the number of calls is bigger that OPEN_CURSORS value, like the bug relates. What is wrong in this code? When do I commit the insertion to close the opened cursor, and how?
I tried to put the following line codes after execute the line "RasterBlock_OraQuery->ExecSQL()", without success:
1) RasterBlock_OraQuery->CommitUpdates();
2) Oracle8Session->Commit();
3) OraBlob->Commit();
4) RasterBlock_OraQuery->ApplyUpdates();
5) Oracle8Session->ApplyUpdates();
void TSpatialInformation::InsertRaster( AnsiString id, unsigned char *buf )
{
AnsiString sql = "INSERT INTO SPATIAL_INFORMATION (BLOCK_ID, SPATIAL_DATA) ";
sql += " VALUES (:Block_Id, :Spatial_Data)";
RasterBlock_OraQuery->SQL->Clear();
RasterBlock_OraQuery->SQL->Add(sql);
RasterBlock_OraQuery->ParamByName("BLOCK_ID")->AsString = id;
AnsiString bufS((char *)buf);
TOraLob *OraBlob = new TOraLob(Oracle8Session->OCISvcCtx);
OraBlob->CreateTemporary(ltBlob);
OraBlob->AsString = bufS;
OraBlob->WriteLob();
RasterBlock_OraQuery->ParamByName("SPATIAL_DATA")->ParamType = ptInput;
RasterBlock_OraQuery->ParamByName("SPATIAL_DATA")->AsOraBlob = OraBlob;
RasterBlock_OraQuery->ExecSQL();
OraBlob->FreeLob();
//delete OraBlob;
}
Thanks!
Rodrigo