Board index » delphi » Select crashes
Vrotie
![]() Delphi Developer |
Select crashes2005-11-08 09:41:34 AM delphi96 Hi, I have a problem selecting and displaying fields. If the data in the field 'JOBNUM' is digits only (eg 500) all works fine. If however there is a character as part of the field (eg A520), I get the error message 'unknown column'. ***** JobNumber is defined as a string variable. JOBNUM is 'varchar(20) not null' in the database. This is my select statement.............. ******* routine ******** IBSQL1.SQL.Text := 'SELECT * FROM JOBCARDS WHERE JOBNUM = ' + JobNumber; IBSQL1.ExecQuery; labCustomerDynamic.Caption := IBSQL1.Fields[1].AsString ; labCustomerNumberDynamic.Caption := IBSQL1.Fields[2].AsString; labDateInDynamic.Caption := IBSQL1.Fields[0].AsString; labJobNumberDynamic.Caption := IBSQL1.Fields[3].AsString; labONDynamic.Caption := IBSQL1.Fields[4].AsString; ***** end of routine ***** Hope someone can help. Lew |