Delete with conditon problem
Posted: 10.09.2018, 22:28
Hi All
Im using 7.2.4-stable with Delphi Berlin starter 10.1
Code:
DM.ZConnection1.Connected := true;
DM.InfoSQL.SQL.Clear;
DM.InfoSQL.SQL.Add('DELETE FROM aInfo WHERE SUPPLIER_NAME = ''Lovato''');
DM.InfoSQL.ExecSQL;
// DM.InfoSQL.Active := true;
If i leave out the WHERE condition the delete works and emptys the table
with the WHERE condition I get the following error
SQL Error: SQL logic error or missing database.
if I run the 'DELETE FROM aInfo WHERE SUPPLIER_NAME = 'Lovato'
in SQLStudio it works
Ive tried the DM.InfoSQL.Active := true; and get the same error
DM.InfoSQL connection is set in its properties to DM.ZConnection1
All other values on the connection and Query component are default.
Thanks in advance for any advice
Im using 7.2.4-stable with Delphi Berlin starter 10.1
Code:
DM.ZConnection1.Connected := true;
DM.InfoSQL.SQL.Clear;
DM.InfoSQL.SQL.Add('DELETE FROM aInfo WHERE SUPPLIER_NAME = ''Lovato''');
DM.InfoSQL.ExecSQL;
// DM.InfoSQL.Active := true;
If i leave out the WHERE condition the delete works and emptys the table
with the WHERE condition I get the following error
SQL Error: SQL logic error or missing database.
if I run the 'DELETE FROM aInfo WHERE SUPPLIER_NAME = 'Lovato'
in SQLStudio it works
Ive tried the DM.InfoSQL.Active := true; and get the same error
DM.InfoSQL connection is set in its properties to DM.ZConnection1
All other values on the connection and Query component are default.
Thanks in advance for any advice