Re: Delphi 5.0 ADO with d5adoupdate2 fail with findNext ?



What I try to do: Use old code with ado with minimum change ;)
Do the TQuery have build in cursor?

Old BDE allow structure just like in this excample
(for simple TQuery "select * from table test")
-------------
with qryTmp do
begin
... query init

if active and findfirst then
repeat
... code
until not findNext;
end;
--------------
Ado gives BOF / EOF, with TADOQuery


I realize that first,next... with "while not EOF do" checking works just fine.
Since I didn't find any document that findNext may cause problems,
I'm just curious. BDE let me write simpler code, ADO seems to require
more. no requestlive and "param" handling is different, must close before SQL.Clear;

-jukka


"Dennis Passmore" <dennis_passmore@xxxxxxxxxxxxxxxx> kirjoitti viestissä news:eniv92pmms5f1uum4hem096k5j1sd7jq2e@xxxxxxxxxx
What are you doing to override the system FindFirst and FindNext functions? Windows FindFirst and
FindNext are boolean functions that require varible information being pasts into them in order to
work. You must have some kind of overrides in your code. The exceptions you are getting in you
ADODB.pas file is simply because the Cursor (_Recordset) is not assigned and checking BOF or EOF
will always raise a exception.


Dennis Passmore



"If you cannot conceive the idea you
will never achieve the desired results"


.



Relevant Pages

  • Re: Enhancing ADO Performance
    ... > currently have applications constructed to retrieve data from ODBC ... > worked with both because of the installation issues when using the BDE ... It seems that ADO ... of data and hooking to a DB grid, use a server-side cursor. ...
    (borland.public.delphi.database.ado)
  • Re: Returning Null value instead of contents of field
    ... > When I use a Forward only cursor in SQL Server I can only read the ... I liked the original brown-covered "ADO Examples and Best Practices" which I ... I have noticed that Microsoft over the years ... You can also read up on various providers in OLE DB documentation but it is ...
    (microsoft.public.data.ado)
  • Re: Query performance MS-Access vs. SQL-server 2000
    ... > between the two alternatives is the use of DAO vs ADO: ... This may be due to the cursor type/location you chose to use in ADO. ... which was designed to work directly with Jet databases. ...
    (microsoft.public.sqlserver.programming)
  • Re: Returning Null value instead of contents of field
    ... The code with Forward only cursor works fine with a DB2 varchar ... Microsofts MSDN site on ADO. ... I have noticed that Microsoft over the years ... very quietly updated the documentation. ...
    (microsoft.public.data.ado)
  • D7 & ADO with ASA9: EOLEException & Multiple-step error
    ... If I rest my pointer over the ".AsString" part of AdoDataMod.aquGetClipReadOnly.FieldByName.AsString, I get the yellow ribbon hint with the text "Delphi Exception EoleException at ... I tried removing the fields from the ADO query, I tried adding them back in again, I tried closing everything and rebooting - so far so bad... ... The BDE version has been working with identical data for nearly 10 years without a hitch - it still is. ...
    (borland.public.delphi.database.ado)