DELPHI XE7
estou com um erro num codigo no delphi xe 7 se alguem puder ajudar fico grato
o erro e o seguinte
---------------------------
softarquivo
---------------------------
sql_statusCliente: Parameter 'status' not found.
---------------------------
OK
---------------------------
estou usando a ferramente de delphi "TDBLOOKUPCOMBOBOK"
na hora de selecionar uma das opçoes que coloquei no banco de dados OK e PENDENTE me retorna o erro
Aqui o codigo que estou usando...
begin
with dm.sql_statusCliente do
begin
close;
SQL.Clear;
sql.Add('select * from status_clientes');
sql.Add('AND status = :id_status');
ParamByName('status').Value := DB_combobox.KeyValue;
Open;
end;
end;
Anderson Saldanha
Curtidas 0
Melhor post
Felipe Morais
20/09/2017
Seu parâmetro está errado, tente assim:
begin
with dm.sql_statusCliente do
begin
close;
SQL.Clear;
sql.Add('select * from status_clientes');
sql.Add('AND status = :id_status');
ParamByName('id_status').Value := DB_combobox.KeyValue;
Open;
end;
end;
GOSTEI 1
Mais Respostas
Anderson Saldanha
19/09/2017
ok vou tentar obrigado
GOSTEI 0
Anderson Saldanha
19/09/2017
Deu outro erro agora rsrsrs
---------------------------
softarquivo
---------------------------
[FireDAC][Phys][MySQL] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND status = 1' at line 2.
---------------------------
OK
---------------------------
---------------------------
softarquivo
---------------------------
[FireDAC][Phys][MySQL] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND status = 1' at line 2.
---------------------------
OK
---------------------------
GOSTEI 0
Anderson Saldanha
19/09/2017
softarquivo
---------------------------
[FireDAC][Phys][MySQL] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND status = 1' at line 2.
---------------------------
OK
---------------------------
Aqi o nome da view estava errado
begin
with dm.sql_statusCliente do
begin
close;
SQL.Clear;
sql.Add('select * from statusCliente');
sql.Add('AND status = id_status');
ParamByName('id_status').Value := DB_combobox.KeyValue;
Open;
end;
end;
estava status_cliente e o certo e statusCliente igual esta agora mais ainda continua o erro
dizendo que o parametro id_status e invalido
---------------------------
softarquivo
---------------------------
sql_statusCliente: Parameter 'id_status' not found.
---------------------------
OK
---------------------------
---------------------------
[FireDAC][Phys][MySQL] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND status = 1' at line 2.
---------------------------
OK
---------------------------
Aqi o nome da view estava errado
begin
with dm.sql_statusCliente do
begin
close;
SQL.Clear;
sql.Add('select * from statusCliente');
sql.Add('AND status = id_status');
ParamByName('id_status').Value := DB_combobox.KeyValue;
Open;
end;
end;
estava status_cliente e o certo e statusCliente igual esta agora mais ainda continua o erro
dizendo que o parametro id_status e invalido
---------------------------
softarquivo
---------------------------
sql_statusCliente: Parameter 'id_status' not found.
---------------------------
OK
---------------------------
GOSTEI 0
Anderson Saldanha
19/09/2017
stou aguarrado neste 2 erros conforme eu mudo da um erro eu mudo da o outro
GOSTEI 0