cursor variable :ocur cannot be nil

cosmini

Member²
hi Marco,
I'm using a two TOracleQuery to retrive a ref cursor data but I'm getting an error right at the execute of the first query. I've confirmed in Toad that the cursor has data and it's working fine.

I'm basically using your example in the documentation but here's my code anyway:

with dm_Reports.qu do begin
DeleteVariables;
SQL.clear;
sql.Add('begin ');
sql.Add(' mypkg.myproc(
redface.gif
cur);');
sql.add('end;');
DeclareVariable('ocur',otCursor);
SetComplexVariable('ocur', oq);
qu.Execute;
end;
oq.execute;....

any tips?
I'm using 8.1.6 and Delphi 5 + some of the later versions of DOA although I don't think it's the very latest.

thx much,
Cosmin
 
This error message would indicate that the "oq" variable in your example code is nil. Could this be the case?

------------------
Marco Kalter
Allround Automations
 
thx Marco, that was exactly what was going on.

[This message has been edited by cosmini (edited 17 March 2003).]
 
Back
Top