You are not logged in.
Pages: 1
Hi, ab.
I have PL/SQL block with a call to package method returning cursor over temporary table. When execute stmt.BoundCursor(1); Oracle return error associated to object not exists. What can I do? I suspect Oracle do commit after ExecutePrepared.
function TApplyRepository.PrintError (DBUser, DBPassword, DBDataBase, ErrorNumber: RawUTF8): TResponse;
var
query: RawUTF8;
stmt: ISQLDBStatement;
cursor: ISQLDBRows;
count: integer;
RemoteProps: TSQLDBOracleConnectionProperties;
begin
RemoteProps := TSQLDBOracleConnectionProperties.Create(DBDataBase, '', DBUser, DBPassword);
query := 'BEGIN STREAM_MONITOR.PRINT_TRANSACTION(P_CURSOR => ?, LTXNID=> ?); END;';
stmt := RemoteProps.NewThreadSafeStatementPrepared(query, false);
stmt.BindCursor(1);
stmt.BindTextS(2,ErrorNumber,paramIn);
try
stmt.ExecutePrepared;
cursor := stmt.BoundCursor(1);
Result.data := cursor.FetchAllAsJSON(true, @count);
Result.count := count;
finally
cursor._Release;
cursor := nil;
stmt._Release;
stmt := nil;
RemoteProps.Destroy;
end;
end;
Offline
Hi, ab.
Work perfect with others cursor. If I use StartTransaction and Commit after
stmt.ExecutePrepared;
cursor := stmt.BoundCursor(1);
work perfect. The problem is when execute PL/SQL block execute Commit by default.
Thank's ab.
Offline
Pages: 1