 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Peter Batten Guest
|
Posted: Tue Oct 10, 2006 8:11 am Post subject: TADOQuery Abstract error |
|
|
Delphi 7 using ADO to link to MYOB.
I build a query which works correctly.
Second time I call the function to run the query I receive either an
EDatabaseError, and Abstract error or an Access Violation
try
quLocatePersonal := TADOQuery.Create(self);
quLocatePersonal.Connection := dmMYOBData.adoconMYOB;
quLocatePersonal.SQL.Clear;
quLocatePersonal.SQL.Add('Select CardIdentification, CardTypeID
from CARDS where CardRecordID = :CardRecordID');
quLocatePersonal.Parameters.ParamByName('CardRecordID').Value :=
fmCMS0.CurrentMYOBCardRecordID;
quLocatePersonal.Open;
finally
quLocatePersonal.Close;
if quLocatePersonal.Prepared then
quLocatePersonal.Prepared := False;
FreeAndNil(quLocatePersonal);
end;
If I change the initial statement to
quLocatePersonal := TADOQuery.Create(nil);
I do not get the error.
Any thoughts appreciated.
Peter |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|