Hi
great to see a forum, good work guys
NOw, I am using zeos databsase on kylix 3
I can successfully login into a mysql server
good
and i can set to use the table needed
but I am not sure of how to add records to the table....
i see you have some very brief examples in the FAQ seciton of this forum...
can you exapnd on those snippets, i.e just a simple code snippet to update a table (where you know the fields. i.e you add data to each field in the table (i guess using the batch command)
thanks very much!!!
Brian
Ps, how can I make a paypal donation to the cause?
thanks!
adding data to a mysql table using zeos database on Kylix 3
Moderators: gto, cipto_kh, EgonHugeist
Hi,
Very easy.
i.e, you have placed on form ZBatchSQL component and called it as dbSQL. In order to insert new record just set SQL property to 'INSERT INTO table SET f1='', f2=''' and so on.
If you want to update an existing record/records set SQL property to
'UPDATE table SET f1='' WHERE keyf1='''
To execute your SQL statement you can by dbSQL.ExecSQL
Hope it helps.
Very easy.
i.e, you have placed on form ZBatchSQL component and called it as dbSQL. In order to insert new record just set SQL property to 'INSERT INTO table SET f1='', f2=''' and so on.
If you want to update an existing record/records set SQL property to
'UPDATE table SET f1='' WHERE keyf1='''
To execute your SQL statement you can by dbSQL.ExecSQL
Hope it helps.
Best regards,
wserg
wserg