Pb while closing ADO query
- From: "Bala" <bkarat@xxxxxxxx>
- Date: Fri, 28 Oct 2005 15:35:22 +0530
Hi !
We are using Delphi 5.0 with SQL Server. Using ADO Connection Command for
accessing database, TADO query and TADO Dataset component for accessing
Table data.
We are facing the following problem, when ADO Query or ADO Dataset record is
blank (ie Record Count = 0) and try to Close or set Active = False, it shows
the error:
" Either BOF or EOF is True, or the current record has been deleted.
Requested operation requires a current record "
Coding is as below:
qryDisplay.Active := False; //This statement returns Error Message when
executed for
//second time
qryDisplay.SQL.Clear;
qryDisplay.SQL.Text := 'Select * From TempCustomers';
qryDisplay.Active := True;
if qryDisplay.RecordCount > 0 Then
Begin
while qryDisplay.RecNo <= 5 do
begin
ShowMessage(qryDisplay.FieldValues['CustName']);
qryDisplay.Next;
end;
End;
Someone pl help
Regards,
Bala
.
- Follow-Ups:
- Re: Pb while closing ADO query
- From: Michael Jacobs
- Re: Pb while closing ADO query
- Prev by Date: Re: Recovering from an updatebatch error with a clone
- Next by Date: Re: Two tiers on the net
- Previous by thread: Recovering from an updatebatch error with a clone
- Next by thread: Re: Pb while closing ADO query
- Index(es):
Relevant Pages
|