NamCit
asked on
Error Message : Query '<field name>' is not found
Dear Advisor !
There is a TADOQuery on TFrom. I use TADOQuery to get data in some cases. Like that
ADOQuery.Active := False
ADOQuery.SQL.Clear
ADOQuery.SQL.Add('<SQL Statemen>')
ADOQuery.Parameters.ParamV alues['<fi led name>'] := <value> ;
ADOQuery.Open
TEdit1.Text := ADOQuery.FieldValues[<Fiel d 1>']
TEdit2.Text := ADOQuery.FieldValues[<Fiel d 2>'] {Line is marked error}
TEdit3.Text := ADOQuery.FieldValues[<Fiel d 3>']
There is no error . But sometime, when i assign value to TEdit, it makes a error. Sometime, ADOQuery remembers the old SQL Statement ?
Query '<field name>' is not found
Althought, i use "select * from" in SQL Statement, or indicate each fields
Thanks for all consider
There is a TADOQuery on TFrom. I use TADOQuery to get data in some cases. Like that
ADOQuery.Active := False
ADOQuery.SQL.Clear
ADOQuery.SQL.Add('<SQL Statemen>')
ADOQuery.Parameters.ParamV
ADOQuery.Open
TEdit1.Text := ADOQuery.FieldValues[<Fiel
TEdit2.Text := ADOQuery.FieldValues[<Fiel
TEdit3.Text := ADOQuery.FieldValues[<Fiel
There is no error . But sometime, when i assign value to TEdit, it makes a error. Sometime, ADOQuery remembers the old SQL Statement ?
Query '<field name>' is not found
Althought, i use "select * from" in SQL Statement, or indicate each fields
Thanks for all consider
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Please provide a few examples of your SQL statement especially on the one(s) when the error ocurrs. I suspect that is where the problem is.
ASKER
Dear Sir !
I have modified muy code so much, so now i dont get thet error again.
i will use FieldByName like your comment.
ASKER
Thanks so much.
I hope to receive more your consider in future
:>)
ASKER
I hhave a new question in forum
{
I use Delphi 5.0
TDBGRID is moved (be wriggled), when i retrieve new data from Table.
I also used InputForm.OrderTable.Disab
}