Hi ppl,
ive spend the last 2 days trying to make these work with no success
can anyone give me a hand on this?
Here is my code for both cases
sqlquery1.UpdateSQL.clear;
SQLQuery1.UpdateSQL.text := 'UPDATE clientes SET clientes.cli_nome = "'+edit7.text+'" where clientes.cli_id = "2588" ';
if(MySQL50Connection1.connected=false)then MySQL50Connection1.connected:=true;
if(SQLTransaction1.active=false)then SQLTransaction1.active:=true;
SQLQuery1.Open;
SQLQuery1.Edit; //Put Query in Edit(Update) Mode
SQLQuery1.Post;
SQLQuery1.ApplyUpdates; //Post and Apply Updates
SQLQuery1.Close;
SQLTransaction1.CommitRetaining;
sqlquery1.DeleteSQL.clear;
SQLQuery1.DeleteSQL.add('DELETE from clientes where clientes.cli_id = "'+edit6.text+'" ;');
if(MySQL50Connection1.connected=false)then MySQL50Connection1.connected:=true;
if(SQLTransaction1.active=false)then SQLTransaction1.active:=true;
SQLQuery1.Open;
SQLQuery1.Delete;
SQLQuery1.Post;
SQLQuery1.ApplyUpdates; //Post and Apply Updates
SQLQuery1.Close;
SQLTransaction1.CommitRetaining;
the updatesql works if i dont use and edit.text... but when i use one it will display an error "No insert query specified and failed to generate one"
on the deletesql i simply get the error "The dataset is empty"
anyone?