1 (edited by prahousefamily 2015-11-09 11:34:53)

Topic: How To Add SQL to Editbox And Display To TableGrid

Help me please !
i will write and change every time   custom sql script in textbox and run Command
and display to tablegrid by button
how to edit even ?

Post's attachments

Attachment icon 021 Lesson SQLITE Command Basic.zip 324.33 kb, 434 downloads since 2015-11-09 

My Visual Database : I Love You
Easy For Beginner Student For Me

Re: How To Add SQL to Editbox And Display To TableGrid

procedure Form1_Button1_OnClick (Sender: string; var Cancel: boolean);
begin
    Form1.TableGrid1.dbSQL:= Form1.Edit1.Text; // the id field, want to be able to edit or delete the entry from the table component
    //Form1.TableGrid1.dbGeneralTable := 'employees'; // Optional (in the case of complex SQL queries with sub queries, you need to choose the main table of the database, also it need to be able to edit or delete the entry from the table component)
    //Form1.TableGrid1.dbListFieldsNames :='delete_col,name2,name3,name4'; // If you do not want to see the value of the id in the component table, enter a name for the column delete_col
    Form1.TableGrid1.dbSQLExecute;
end;
Dmitry.

Re: How To Add SQL to Editbox And Display To TableGrid

Thank You Very Much
love love love
Ok it work and very easy

My Visual Database : I Love You
Easy For Beginner Student For Me