nikeloeleven
Programmer
hi there.... im using a very simple Select Statement in Delphi...
I have a table called "TARGET".. the unique field is Admission Number (of pupil) and Target Number....
the database is an interbase database constructed using SQL... I have placed an SQL query such as this to retreive some fields from the Target Table when the data entered into a masked edit box matches the data in AdmissionNumber field....
with DataModMain.queryUpdateTarget do begin
Close;
SQL.Clear;
SQL.Add('select ADMISSIONNUMBER, DESCRIPTION, EXPECTEDEVIDENCE, STRATEGYUSED, SUBJECTNAME, TARGETCATEGORY, TARGETNUMBER from TARGET WHERE ADMISSIONNUMBER = "' + maskAdmissionNumber.text +'" ');
Open;
end;
so for example, if i entered "A11889" into the edit box... then the program would search for all records whose admission number is A11889....
however my problem is this: i get an error message when this sql statement is run...
the error is: the project raised exception class EIBInterbaseError with message "Dynamic SQL Error. SQL Error Code = -206.... Column Unknown A11889".... Process Stopped....
so if i enter A11889 into the maskbox then i get that error message... i don't see what the problem is and iv'e tried everything but i can't seem to press the right button....
please help me solve this problem as it seems minor but i've been stuck on it for a reason i cant seem to figure out... the code doesn't seem wrong to me ...
any suggestions? thnx.....
I have a table called "TARGET".. the unique field is Admission Number (of pupil) and Target Number....
the database is an interbase database constructed using SQL... I have placed an SQL query such as this to retreive some fields from the Target Table when the data entered into a masked edit box matches the data in AdmissionNumber field....
with DataModMain.queryUpdateTarget do begin
Close;
SQL.Clear;
SQL.Add('select ADMISSIONNUMBER, DESCRIPTION, EXPECTEDEVIDENCE, STRATEGYUSED, SUBJECTNAME, TARGETCATEGORY, TARGETNUMBER from TARGET WHERE ADMISSIONNUMBER = "' + maskAdmissionNumber.text +'" ');
Open;
end;
so for example, if i entered "A11889" into the edit box... then the program would search for all records whose admission number is A11889....
however my problem is this: i get an error message when this sql statement is run...
the error is: the project raised exception class EIBInterbaseError with message "Dynamic SQL Error. SQL Error Code = -206.... Column Unknown A11889".... Process Stopped....
so if i enter A11889 into the maskbox then i get that error message... i don't see what the problem is and iv'e tried everything but i can't seem to press the right button....
please help me solve this problem as it seems minor but i've been stuck on it for a reason i cant seem to figure out... the code doesn't seem wrong to me ...
any suggestions? thnx.....