Fórum DELPHI XE7 #586024
19/09/2017
0
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
Curtir tópico
+ 0Post mais votado
20/09/2017
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;
Felipe Morais
Gostei + 1
Mais Posts
20/09/2017
Anderson Saldanha
Gostei + 0
20/09/2017
Anderson Saldanha
---------------------------
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
20/09/2017
Anderson Saldanha
---------------------------
[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
20/09/2017
Anderson Saldanha
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)