Hello,
I am struggling to understand the difference between SQLUpdate.Text and SQL.Text.
the following code works correctly
SQL.Clear;
SQL.Text:=('UPDATE tbl_invoices .........
pgquery1.Execute;
but the following one doesn't
SQLUpdate.Clear;
SQLUpdate.Text:=('UPDATE tbl_invoices .........
pgquery1.Execute;
I understand that pgquery1.Execute operates on SQL.Text only and I can use this parameter for updates, deletions etc.
If so, why do I have the parameters SQLUpdate, SQLRefresh, SQLInsert etc. ? How and when do I have to use them ?
Many thanks
Pio Pio
Difference between SQLUpdate.Text and SQL.Text.
Hello,
The SQLinsert, SQLUpdate, SQLDelete, and SQLRefresh properties are used to create SQL operators that are called after calling of the Post method of the corresponding DataSet and if they are not specified, they will be set by default. I. e., if the Select operator is specified in SQL.Text and you need to have specific Insert, Update, etc. operations, you can use these properties.
You can find more detailed information in the help file.
PgQuery1.Exec SQL -> used PgQuery1.SQL.Text
PgQuery1.Edit [Insert, Delete]
PgQuery1.Post - > used PgQuery1.SQLUpdate [SQLInsert, SQLDelete]
The SQLinsert, SQLUpdate, SQLDelete, and SQLRefresh properties are used to create SQL operators that are called after calling of the Post method of the corresponding DataSet and if they are not specified, they will be set by default. I. e., if the Select operator is specified in SQL.Text and you need to have specific Insert, Update, etc. operations, you can use these properties.
You can find more detailed information in the help file.
PgQuery1.Exec SQL -> used PgQuery1.SQL.Text
PgQuery1.Edit [Insert, Delete]
PgQuery1.Post - > used PgQuery1.SQLUpdate [SQLInsert, SQLDelete]