[SOLVED] Lazarus + Firebird how to delete from table!? lazarus / 16-Databases ---------------------------------------------------------------------- nicke85 · 2010-09-21 16:07 I'm new with firebird database and don't know how to delete  from table.. I want one or two Edit1.Text components on form to use like criterium for delete from table.. What I need to do..!? If write     Code: [Select]SQLQuery1.SQL.Text:='delete from (table) where xxx=:' + Edit1.Text; it doesnt work.. does somebody can write me steps and components without SQLQuery1.DeleteSQL component.. ---------------------------------------------------------------------- mirce.vladimirov · 2010-09-21 20:44 I dont know about the FirebirdSQL, I have never used it, but I think that you need to enclose the edit1.text in single qutoes, because it is a string. Strings must be quoted with single quotes. And number two, I believe that the equation sign is typed incorectly, it should not be xxx:='some text' like in pascal/delphi/lazarus, the SQL correct gramar is just '=' xxx='some text' Code: [Select] SQLQuery1.SQL.Text:='delete from table where xxx=' + #39 + Edit1.Text + #39; The character #39 is a single quote. This line of code would be same like if you typed to the SQL prompt the following: Code: [Select]delete from table where xxx='this is the text contained in the edit1'; ---------------------------------------------------------------------- Lacak2 · 2010-09-22 04:12 Yes, and you can also use syntax with parameter: Code: [Select]SQLQuery1.SQL.Text:='delete from table where xxx=:xxx'; SQLQuery1.Params.ParamByName('xxx').AsString:='some text'; SQLQuery1.ExecSQL; ---------------------------------------------------------------------- nicke85 · 2010-09-23 17:26 Thanks for reply mirce.vladimirov and Lacak2... For Firebird conection I need IBConnection1,SQLTransaction and SQLQuery..i know how to insert,update make functions but don't know how to delete.. What is with SQLTransaction when i need to delete from table!? I got every time that data from table is errased but there is no change into table for really... ---------------------------------------------------------------------- Lacak2 · 2010-09-24 04:05 May be, that you must also Commit changes using: Code: [Select]SQLTransaction1.Commit; or SQLTransaction1.CommitRetaining ---------------------------------------------------------------------- jagorath · 2010-09-24 04:54 As an aside, you can use QuotedStr from SysUtils as an alternative to #39 or a quote character, e.g. Code: [Select]SQLQuery1.SQL.Text:= 'delete from table where xxx=' + QuotedStr(Edit1.Text); ---------------------------------------------------------------------- nicke85 · 2010-09-26 12:41 Lacak2 open SQLTransaction1 solve my problem for Insert and Update but real problem was in QuotedStr like jarogath wrote.. And Yes!!!!It solved my problem thanks you a lot for help jarogath