Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL error - 'could not find record'

Status
Not open for further replies.

garylafferty

Programmer
May 1, 2002
8
GB
I am having a problem with generating a query (making it active), which is giving up the following error message:

Could not find record

when trying the following code:


query99.active:=false;
query99.active:=true;

while not query99.eof do
begin

query1.active:=false;
query1.params[0].asstring:=query99USERNAME.asstring;
query1.params[1].asdatetime:=DATEpick.date;
query1.active:=true; <---- FAILS ON THIS LINE OF CODE!

// writes to a memo field

query99.next
end;



query1 has the following properies:

autocalcfields = true
autorefreshed = false
cachedupdate = false
constrained = false
requestlive = true



query99 generates the same 10 records every time, and it only fails on the seventh record. I have used the same code daily for the past few weeks, and it has worked every time. Now it fails & I can't understand why , nor do I know what the error message &quot;could not find record&quot; means.

Would be VERY grateful for ANY assistance on this, thanks.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top