Subject | problems with SQL query |
---|---|
Author | petesouthwest |
Post date | 2004-07-29T07:25:28Z |
Hi
I have just converted my app from paradox to firebird using the IBO components. I was using the bit of code below to find one record from 2 tables that are joined on empNo, the user can then select the employee number in the edit box and the project from a combo box (cmbModule). In paradox it worked fine and came back with the corresponding records from both tables. However, in my firebird/ibo version it appears to come back with all the records in the employee table, matched with one record in the project1 table.
Can anyone suggest what is happening?
Thanks
Pete
code:
queryString:='SELECT * FROM employee INNER JOIN project1 ON project1.empNo =:empNo WHERE empNo="' + form1.DBEdit3.EditText +'" AND projectno='+'"' +form1.cmbModule.text+'"';
with datamodule2.qryFBAll do
begin
close;
sql.Clear;
sql.add(queryString);
open;
end;
[Non-text portions of this message have been removed]
I have just converted my app from paradox to firebird using the IBO components. I was using the bit of code below to find one record from 2 tables that are joined on empNo, the user can then select the employee number in the edit box and the project from a combo box (cmbModule). In paradox it worked fine and came back with the corresponding records from both tables. However, in my firebird/ibo version it appears to come back with all the records in the employee table, matched with one record in the project1 table.
Can anyone suggest what is happening?
Thanks
Pete
code:
queryString:='SELECT * FROM employee INNER JOIN project1 ON project1.empNo =:empNo WHERE empNo="' + form1.DBEdit3.EditText +'" AND projectno='+'"' +form1.cmbModule.text+'"';
with datamodule2.qryFBAll do
begin
close;
sql.Clear;
sql.add(queryString);
open;
end;
[Non-text portions of this message have been removed]