Home » Community » Newbie corner » Getting the SQL statement without execute it
Getting the SQL statement without execute it [message #50661] |
Fri, 30 November 2018 12:49  |
Giorgio
Messages: 218 Registered: August 2015
|
Experienced Member |
|
|
Hi there,
is there a way to getting the SQL statement upp is going to issue, without actually execute it?
For example the following code will produce (in PostgreSQL) the SQL statement "insert into PERSONS(NAME, SURNAME) values ('John', 'Doe')" and will execute the query:
try {
SQL & Insert(PERSONS)
(NAME, "John")
(SURNAME, "Doe");
} catch(SqlExc) {
ErrorOK(t_("Failed adding data to the database due to the following error: ") + SQL.GetLastError());
}
What I would like to have is a way to have the statement "insert into PERSONS(NAME, SURNAME) values ('John', 'Doe')" in a string variable, without actually executing it (so I will not find a new record in the db); is there a way to achieve this?
Thanks,
gio
|
|
|
|
Goto Forum:
Current Time: Sat Apr 26 02:19:48 CEST 2025
Total time taken to generate the page: 0.00598 seconds
|