Page 1 of 1

25 rows in TOraQuery

Posted: Mon 10 Jul 2006 21:26
by kglenn
I have a problem when receiving all the rows back from my oracle ref cursor.
Everything works fine as long as my rowcount >=25. If I try to receive anything
less, I don't get anything back. I know that 25 matches the FetchRows property,
and I've tried setting that down to 1. I've also tried the FetchAll=true, but
that doesn't seem to work either.

Any suggestions?

I am using 5.50.0.15 and C++ Builder.

TOraStoredProc *sp=new TOraStoredProc(NULL);
sp->Session = sess;
sp->FetchAll = true;
sp->StoredProcName = "someproc";
sp->PrepareSQL();

// Setup the "in" params
...

sp->ExecProc();
TOraQuery *q = new TOraQuery(NULL);
q->Cursor = sp->ParamByName("rc1")->AsCursor;

q->FetchAll = true;
q->Open();

Thanks in advance.

Posted: Mon 10 Jul 2006 21:53
by kglenn
I did see this in another message, am I correct to assume that this will apply to me also?

http://crlab.com/forums/viewtopic.php?t ... toraquery

OraSQL.SQL.Add('begin');
OraSQL.SQL.Add('GetElencoIntercettazioni(:p_id_target, :p_modalita, :p_data);');
OraSQL.SQL.Add('end;');
OraSQL.ParamByName('p_id_target').AsInteger := ID;
OraSQL.ParamByName('p_modalita').AsString := 'F';
OraSQL.ParamByName('p_data').DataType := ftCursor;
OraSQL.Execute;

OraQuery.Cursor := OraSQL.ParamByName('p_data').AsCursor;
OraQuery.Open;[/url]

Posted: Tue 11 Jul 2006 06:43
by Challenger
Yes, you are right. Please refer to http://crlab.com/forums/viewtopic.php?t=4588.