| View previous topic :: View next topic |
| Author |
Message |
Nyssi Guest
|
Posted: Sun Jun 25, 2006 6:53 pm Post subject: Delphi 5.0 ADO with d5adoupdate2 fail with findNext ? |
|
|
Delphi 5.0 ADO with d5adoupdate2 fail with findNext ?
At least this little piece of code fails with .. BOF EOF error in my case...(firebird,mssql6.5)
-------------
if active and findfirst then
repeat
...
until not findNext;
end;
--------------
If I just alter the file ADODB and compile with it works fine...
---------------- ADODB.PAS line 4689
if not Cursor.BOF and not Cursor.EOF then // added "Exception" ???
begin
if (Cursor <> Recordset) then
Recordset.Bookmark := FFindCursor.Bookmark;
Resync([rmExact, rmCenter]);
SetFound(True);
end;
except
----------------
Is This known bug or am I doing something terribly wrong?
-jukka |
|
| Back to top |
|
 |
Mike B Guest
|
Posted: Mon Jun 26, 2006 1:38 am Post subject: Re: Delphi 5.0 ADO with d5adoupdate2 fail with findNext ? |
|
|
Have you installed the Delphi 5 ADO updates?
Mike
"Nyssi" <jukka.raisio (AT) galileo (DOT) inet.fi> wrote in message
news:449e9514$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Delphi 5.0 ADO with d5adoupdate2 fail with findNext ?
At least this little piece of code fails with .. BOF EOF error in my
case...(firebird,mssql6.5)
-------------
if active and findfirst then
repeat
...
until not findNext;
end;
--------------
If I just alter the file ADODB and compile with it works fine...
---------------- ADODB.PAS line 4689
if not Cursor.BOF and not Cursor.EOF then // added "Exception" ???
begin
if (Cursor <> Recordset) then
Recordset.Bookmark := FFindCursor.Bookmark;
Resync([rmExact, rmCenter]);
SetFound(True);
end;
except
----------------
Is This known bug or am I doing something terribly wrong?
-jukka
|
|
|
| Back to top |
|
 |
g Guest
|
Posted: Mon Jun 26, 2006 3:28 pm Post subject: Re: Delphi 5.0 ADO with d5adoupdate2 fail with findNext ? |
|
|
I have installed d5adoupdate2, is there other updates, do I need the update1?
(I tried with D6Ent and I had the same problem with it. Now I have jeopardized
the rest of D5 ADODB.PAS FindNext function and the old code works with ADO)
Does the "d5adoupdate2" require library recompilation or something more
than Installing and project build
-jukka
| Quote: | Have you installed the Delphi 5 ADO updates?
Mike
Delphi 5.0 ADO with d5adoupdate2 fail with findNext ?
At least this little piece of code fails with .. BOF EOF error in my
case...(firebird,mssql6.5)
-------------
if active and findfirst then
repeat
...
until not findNext;
end;
--------------
If I just alter the file ADODB and compile with it works fine...
---------------- ADODB.PAS line 4689
if not Cursor.BOF and not Cursor.EOF then // added "Exception" ???
begin
if (Cursor <> Recordset) then
Recordset.Bookmark := FFindCursor.Bookmark;
Resync([rmExact, rmCenter]);
SetFound(True);
end;
except
----------------
Is This known bug or am I doing something terribly wrong?
-jukka
|
|
|
| Back to top |
|
 |
Dennis Passmore Guest
|
Posted: Mon Jun 26, 2006 5:00 pm Post subject: Re: Delphi 5.0 ADO with d5adoupdate2 fail with findNext ? |
|
|
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" |
|
| Back to top |
|
 |
g Guest
|
Posted: Mon Jun 26, 2006 8:38 pm Post subject: 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 (AT) nospam_yahoo (DOT) com> kirjoitti viestissä news:eniv92pmms5f1uum4hem096k5j1sd7jq2e (AT) 4ax (DOT) com...
| Quote: | 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" |
|
|
| Back to top |
|
 |
|