Help - Stuck With 20 Records Per SQL Fetch ?????
Help!!!!
We are using a remote Oracle7 database and in all of our TQuery and
TTable components, we have found that Delphi 2.0 seems to only retrieve
20 records at a time (even if we use the FetchAll method). This means
that if we want to retrieve 200 records, Delphi seems to issue about 20
separate calls to our SQL database!
We know this, 1) by watching the mouse cursor change to the "SQL"
hourglass while we scroll down in a DBGrid, 2) by looking at the multiple
fetch commands issued in the SQL Monitor log, 3) by checking the hits to
the Oracle RDBMS on our server, and 4) by how slow Delphi is when
bringing a bunch of records (constrained or not) into client memory.
We have tried setting the SQLQRYMODE explicitly to SERVER, experimenting
with the DBE object properties (especially curMAXROWS), and by
experimenting with different record and table sizes. Nothing seems to
change the 20 records per fetch behavior. Even the Database Explorer has
this limitation. We have looked through all of the code in BD.pas and
BDtables.pas and have written BDE equivalents for TQuery to see if we
could fix this. Everything seems to be internal to the DbiQExec or
DbiQExecDirect functions for TQueries and to DBI cursor behavior for
TTables. No answers from DbiGetProp have shed any light.
We have seen, however, a mysterious call as reported in SQL Monitor "SQL
Misc: ORACLE - Set rowset size". Could this be telling the BDE to bring
back only 20 at a time? In contrast, Powerbuilder, as inelegant as it
is, beautifully sends a single fetch and retrieves all necessary records
into its buffer in a single sweep.
Please help. We are getting desperate and incredulous over what we
consider is, hopefully, the result of our own stupidity and oversight.
Thank you in advance for your much needed help.
Jeff K
Hillside, NJ
email: je...@panix.com