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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADOQUERY HEADACHES

Status
Not open for further replies.

hbez

Instructor
Mar 25, 2003
49
ZA
I am experiencing two frustrating problems with an ADOQuery:
1) QRY1 uses a ConnectionString to Access db1. QRY2 must use a ConnectionString to another Access db2 in a different folder. However, QRY2 keeps telling me it cannot find db2 in the folder where db1 is located. To at least make the thing work I copied the db to the first folder but, it's not supposed to be there.

2) I set up an SQL that I run on QRY2 and I can find a FieldValue without any problem. I immediately try to run another slightly different SQL on QRY2 but I get a 'Field not found' error if I then try to get a FieldValue again. The code looks as follows (abbr):

Code:
qrySetLanguage.SQL.Text := 'SELECT LANG, FIELDNAME, StringContent FROM FieldContent WHERE LANG="' + Language + '" AND FIELDNAME="lblReg"';
qrySetLanguage.Active := True;
lblReg.Caption := qrySetLanguage.FieldValues['StringContent'];

This is repeated several times. I've tried to Close and to de-Activate the query, no luck. As usual I'm probably missing the tree for the woods but will really appreciate help.
Hannes
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top