U++ framework
Do not panic. Ask here before giving up.

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 Go to previous message
Giorgio is currently offline  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


 
Read Message
Read Message
Previous Topic: Immediately refresh a control?
Next Topic: OK and Cancel Layout
Goto Forum:
  


Current Time: Sat Apr 25 14:55:04 GMT+2 2026

Total time taken to generate the page: 0.00980 seconds