Hello,
I have a button when click
do this
procedure TLogin.Button1Click(Sender: TObject);
var
strSqlLog: String;
begin
strSqlLog:= 'Select * from usuario,perfil WHERE usuario.nivel = perfil.id';
strSqlLog:= strSqlLog + 'AND fantasia = ' + #39 + (valorNome.text) + #39 ;
strSqlLog:= strSqlLog + 'AND senha = ' + #39 + (valorNome.text) + #39 ;
menuPrin.QueryLogin.Close;
menuPrin.QueryLogin.SQL.Clear;
menuPrin.QueryLogin.sql.Add(strSqlLog);
menuPrin.QueryLogin.Open;
the problem is... the line
strSqlLog:= strSqlLog + 'AND fantasia = ' + #39 + (valorNome.text) + #39 ;
strSqlLog:= strSqlLog + 'AND senha = ' + #39 + (valorNome.text) + #39 ;
It told invalid statement....
I don't know what's wrong....
Please help me
Thanks a Lot
Luciano Marques
I have a button when click
do this
procedure TLogin.Button1Click(Sender: TObject);
var
strSqlLog: String;
begin
strSqlLog:= 'Select * from usuario,perfil WHERE usuario.nivel = perfil.id';
strSqlLog:= strSqlLog + 'AND fantasia = ' + #39 + (valorNome.text) + #39 ;
strSqlLog:= strSqlLog + 'AND senha = ' + #39 + (valorNome.text) + #39 ;
menuPrin.QueryLogin.Close;
menuPrin.QueryLogin.SQL.Clear;
menuPrin.QueryLogin.sql.Add(strSqlLog);
menuPrin.QueryLogin.Open;
the problem is... the line
strSqlLog:= strSqlLog + 'AND fantasia = ' + #39 + (valorNome.text) + #39 ;
strSqlLog:= strSqlLog + 'AND senha = ' + #39 + (valorNome.text) + #39 ;
It told invalid statement....
I don't know what's wrong....
Please help me
Thanks a Lot
Luciano Marques