Client: 10.1.0.5
Server: 10.1.0.5
DOA 4.0.7.1, BDS 2006.
When calling this SP using a ref cursor:
I get this exception:
I am using this code:
Am I missing something, or is this a bug?
Server: 10.1.0.5
DOA 4.0.7.1, BDS 2006.
When calling this SP using a ref cursor:
Code:
PROCEDURE GET_TREES(Trees OUT SYS_REFCURSOR)
IS
BEGIN
OPEN Trees FOR
SELECT TREE_ID, TREE_NAME, PROJECT_ID,
MAIN_NODE FROM TREES;
END;
Code:
- First chance exception 0xC0000005 ACCESS_VIOLATION occurred at 0x60D9322D, read of address 0x00000094 at 0x60D9322D (in C:\Programmi\Oracle.1.0Client\BIN\oracommon10.dll) 0x60D9322D vsnupr + 0x18ECD in oracommon10.dll
0x60D437A8 ttcfour + 0x1264 in oracommon10.dll
0x60D41099 ttcdrv + 0x381 in oracommon10.dll
0x607FE16D nioqwa + 0x2D in oran10.dll
0x617BF744 kgupftc + 0x21E74 in oraclient10.dll
0x6176D4DD upirtrc + 0x7D in oraclient10.dll
0x61755FBD kpurcsc + 0x6D in oraclient10.dll
0x617336AC kpuexInitStmh + 0x1A9C in oraclient10.dll
0x61734E35 kpuexec + 0xC65 in oraclient10.dll
0x616D1312 OCIStmtExecute + 0x22 in oraclient10.dll
Code:
procedure TForm1.Button1Click(Sender: TObject);
var
TreeCursor: TOracleQuery;
begin
TreeCursor := TOracleQuery.Create(nil);
try
TreeCursor.Session := spGetTrees.Session;
with spGetTrees do
begin
SetComplexVariable('RECORDSET', TreeCursor);
Execute; // <- Exception
end;
// Load trees
with TreeCursor do
begin
Execute;
while not Eof do
begin
// Do someting here
Next;
end;
end;
finally
TreeCursor.Free;
end;
end;
// DFM
object spGetTrees: TOracleQuery
SQL.Strings = (
'begin'
' ADM_TREES.GET_TREES(:RECORDSET);'
'end;')
Session = ssSession
Variables.Data = {
03000000010000000A0000003A5245434F524453455474000000000000000000
0000}
Left = 160
Top = 8
end