New user to SQLQuery
I have a problem, here is a simplified code on a buttons on-click event
query1.Close;
query1.SQL.Clear;
query1.SQL.Add('SELECT EMP_NO, FIRST_NAME, FULL_NAME, LAST_NAME, SALARY' );
query1.SQL.Add('FROM EMPLOYEE');
query1.sql.Add('WHERE FIRST_NAME='+edit1.Text);
query1.Open;
I have an error on run when you enter text in an edit box.
I know the SQL statement is correct as the DBGrid shows the result at design time. the problem has to do with the parameters section.
How do I use the parameters in the above code.
Ive tried everything in the help section but nothing.
Sorry and thanks for any help.
I have a problem, here is a simplified code on a buttons on-click event
query1.Close;
query1.SQL.Clear;
query1.SQL.Add('SELECT EMP_NO, FIRST_NAME, FULL_NAME, LAST_NAME, SALARY' );
query1.SQL.Add('FROM EMPLOYEE');
query1.sql.Add('WHERE FIRST_NAME='+edit1.Text);
query1.Open;
I have an error on run when you enter text in an edit box.
I know the SQL statement is correct as the DBGrid shows the result at design time. the problem has to do with the parameters section.
How do I use the parameters in the above code.
Ive tried everything in the help section but nothing.
Sorry and thanks for any help.