Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
Databases
»
[SOLVED] TSQLQUERY : automatically generated update,insert delete statement
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
SynEdit theme
by
Martin_fr
[
Today
at 05:17:43 pm]
Lazarus Bugfix Release 4....
by
slicke
[
Today
at 04:20:04 pm]
Conscious Artificial Inte...
by
schuler
[
Today
at 03:56:48 pm]
[New Component] ExtTabCtr...
by
ovidio
[
Today
at 03:55:41 pm]
Single and Double, Conver...
by
Paolo
[
Today
at 03:43:42 pm]
Which Control should I us...
by
J-G
[
Today
at 03:33:56 pm]
If FileExists(
by
PascalDragon
[
Today
at 03:24:46 pm]
docked IDE and form capti...
by
Paolo
[
Today
at 02:53:50 pm]
New version of LazMapView...
by
wp
[
Today
at 12:09:27 pm]
Very rough version of a s...
by
Hansvb
[
Today
at 11:48:04 am]
PadXml 1.1.0 – Portable A...
by
AlexanderT
[
Today
at 10:38:42 am]
Arkanoid
by
Tomi
[
Today
at 09:46:46 am]
Interesting video
by
Joanna
[
Today
at 06:24:53 am]
IndySecOpenSSL is now ava...
by
TheMouseAUS
[
Today
at 03:49:17 am]
Message CM_ShowingChanged...
by
LeP
[
Today
at 02:13:51 am]
Fast Canvas Library V1.05...
by
Gigatron
[
Today
at 01:48:44 am]
[SOLVED]Program experienc...
by
Cainnech
[
Today
at 12:19:17 am]
TATTabs - how to stop a 3...
by
bobonwhidbey
[
Today
at 12:03:15 am]
If you are looking for Wi...
by
avra
[June 12, 2026, 07:37:10 pm]
Can /my/ AI help me with ...
by
microxa
[June 12, 2026, 04:26:18 pm]
Testing with 3.2.4 prepar...
by
Martin_fr
[June 12, 2026, 03:50:17 pm]
TDWEdit
by
Ed78z
[June 12, 2026, 10:20:58 am]
Strange Behaviour at Runt...
by
andrew Bubble
[June 12, 2026, 09:54:40 am]
FPC Debug mode releases [...
by
Martin_fr
[June 12, 2026, 09:22:25 am]
Implementing an Elo ratin...
by
paule32
[June 12, 2026, 08:43:20 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] TSQLQUERY : automatically generated update,insert delete statement (Read 668 times)
k1attila1
Full Member
Posts: 109
[SOLVED] TSQLQUERY : automatically generated update,insert delete statement
«
on:
October 26, 2024, 04:41:48 pm »
HI
I have a TQuery with SELECT sql statement.
TQuery can automatically generate update,insert, delete statement from this. OK so far.
Question :
Is there any way I can get these generated statements ?
thank you Attila
«
Last Edit: October 26, 2024, 05:30:24 pm by k1attila1
»
Logged
rvk
Hero Member
Posts: 7045
Re: TSQLQUERY : automatically generated update,insert delete statement
«
Reply #1 on:
October 26, 2024, 05:17:37 pm »
Really 'ugly' method:
Code: Pascal
[Select]
[+]
[-]
type
THackMyConnection
=
class
(
TSQLConnection
)
;
var
S
:
String
;
ReturningClause
:
boolean
;
//..
SQLQuery1
.
Open
;
ReturningClause
:
=
false
;
S
:
=
THackMyConnection
(
SQLite3Connection1
)
.
ConstructInsertSQL
(
SQLQuery1
,
ReturningClause
)
;
Showmessage
(
S
)
;
You might be better off to make your own ConstructInsertSQL from the source from TSQLConnection.ConstructInsertSQL().
Otherwise you can also monitor the insert itself (while doing an actual INSERT) and catch the SQL statement.
(not sure which monitor component you need for that)
Logged
k1attila1
Full Member
Posts: 109
Re: TSQLQUERY : automatically generated update,insert delete statement
«
Reply #2 on:
October 26, 2024, 05:30:01 pm »
Thank you, Sir
This is what I was looking for
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Databases
»
[SOLVED] TSQLQUERY : automatically generated update,insert delete statement
TinyPortal
© 2005-2018