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):
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
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):
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