Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 next 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


Re: Getting the SQL statement without execute it [message #60754 is a reply to message #50661] Wed, 28 August 2024 23:58 Go to previous message
sduensin is currently offline  sduensin
Messages: 8
Registered: August 2024
Location: Smithton, IL, USA, Earth
Promising Member
I'll bump this years later. I'm also interested in doing this!

Help? Very Happy
Previous Topic: Immediately refresh a control?
Next Topic: OK and Cancel Layout
Goto Forum:
  


Current Time: Sat Apr 26 02:19:48 CEST 2025

Total time taken to generate the page: 0.00598 seconds