Newbie - Question3 - using SQLInsert .. SQLdelete

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Edison Garcia
Posts: 29
Joined: Sat 29 Jul 2006 01:52

Newbie - Question3 - using SQLInsert .. SQLdelete

Post by Edison Garcia » Sat 29 Jul 2006 02:29

I had readed some questions and aswers about how to use the SQLDelete, SQLupdate strings in MyQuery component, but it is not clear to me. If I do not have to put any text in this strings, and then basic instruction is an "execute", it comes to me the following doubts:
1 - if it is not to use something like an "executeDelete", for instance, and I have to use just "execute", how to define with operation (delete, insert... ) will be executed, since all the strings (delete, update, insert...) are there ?
2 -for instance, in the case of a "delete". Which record will be deleted, the current one ? or if I will use something like 'where xxx = :param', where to indicate the param value ?

The possibility of have insert, delete,update strings in the same query comp. is very nice, but the use of then is not clear to me.

thank you
Edison

swierzbicki
Posts: 451
Joined: Wed 19 Jan 2005 09:59

Post by swierzbicki » Sun 30 Jul 2006 19:45

You don't have to modify the insert/update/delete properties.
The insert/upate/delete properties are interresting when working with complex SQL queries (using inner joins, nested statements...)

The insert/update/delete statement will be executed upon the current record only

Post Reply