Lazarus
Home
Forum
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
Databases
»
INSERT IBconnection+transaction+SQLquery+Datasource+dbedit
Downloads
Daily Snapshots
FAQ
Wiki
Bugtracker
IRC channel
Developer Blog
Follow us on Twitter
Mailing List
Free pascal
Other languages
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
About donations (wiki)
Bookstore
Lazarus, the complete guide
Search
Advanced search
« previous
next »
Print
Pages: [
1
]
Author
Topic: INSERT IBconnection+transaction+SQLquery+Datasource+dbedit (Read 4699 times)
abmservice
Jr. Member
Posts: 57
INSERT IBconnection+transaction+SQLquery+Datasource+dbedit
«
on:
August 14, 2009, 10:36:41 pm »
LAZARUS 0.9.27
FIREBIRD 2.1
WINDOWS XP
IBconnectoin(SQLdb)
sqltransactoin
sqlquery
datasource
dbedit
INSERT
begin
sqlquery.post;
sqlquery.applyupdates;
sqltransaction.commit;
end;
After adding a record to a database other components connected to SQLQuery IBconnectoin be disconnected. Why? What's wrong?
Logged
clauslack
Sr. Member
Posts: 264
Re: INSERT IBconnection+transaction+SQLquery+Datasource+dbedit
«
Reply #1 on:
August 19, 2009, 01:49:52 am »
Maybe when you commit an insert, after you must do a select in a new transaction.
You can try this example for select-insert with Firebird.
Change in FormCreate the parameter for you Firebird database.
Upload sql_example.zip
Tested under
- Windows XP SP3 and Linux
- Lazarus 0.9.27 svn 21289 fpc 2.3.1 svn 13383/fpc 2.2.4.
- Firebird 2.1.2
Regards
Logged
Loesje
Full Member
Posts: 153
Re: INSERT IBconnection+transaction+SQLquery+Datasource+dbedit
«
Reply #2 on:
August 25, 2009, 06:21:30 pm »
.Commit commits and closes the transaction. All other datasets/things within the same connection are also closed. You need .CommitRetaining which keeps the connection open.
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Databases
»
INSERT IBconnection+transaction+SQLquery+Datasource+dbedit
Recent
ListBox Filter
by
lainz
[
Today
at 05:00:07 am]
BGRAControls
by
lainz
[
Today
at 03:10:41 am]
FPCUp FPC/Lazarus SVN ins...
by
lainz
[
Today
at 03:09:38 am]
What is this Delphi Heade...
by
DirkS
[
Today
at 12:11:59 am]
Build of SQLite3 for WINC...
by
bambamns
[
Today
at 12:09:01 am]
Lazarus crashes after “Re...
by
and4977
[May 20, 2012, 11:26:31 pm]
Scrambled dragimage
by
Ocye
[May 20, 2012, 10:30:19 pm]
Transparency with Qt on D...
by
Ocye
[May 20, 2012, 08:14:43 pm]
DragImage adds as new win...
by
Ocye
[May 20, 2012, 08:05:24 pm]
TFrame size
by
iru
[May 20, 2012, 07:03:22 pm]