[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Am I missing a database update?

Posted on 2004-03-25
5
Medium Priority
?
228 Views
Last Modified: 2010-05-19
Im using interbase as my back end db.

Im updating a record using a TIBQuery, setting the params and using ExecSQL command to execute it.
The record seems to be updating in the grids etc I am using, but when I use another query to retrieve data fom the table Ive updated it doesnt seem to be there.
If I shut the program down again and restart, the information then appears.

Im not using cached updates.

Whe I use the execsql, do I need to apply/commit somewhere?
I cant do applydates on the dataset as it is closed (just using execsql command to update)
0
Comment
Question by:mikelittlewood
  • 3
  • 2
5 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 10677834
yep, seems that a commit is missed
0
 
LVL 15

Author Comment

by:mikelittlewood
ID: 10678827
hmm ...

what part of the code needs the commit?
If I put it after execsql it won't compile.
Which object needs the .commit?
Or is there a commit setting on the object Im missin?
0
 
LVL 15

Author Comment

by:mikelittlewood
ID: 10678856
I thought if your query is just -

update TABLE set blah blah blah

- then execsql would just update the record and commit automatically (bearing in mind no cache updates)
0
 
LVL 27

Accepted Solution

by:
kretzschmar earned 200 total points
ID: 10679658
sorry for delay, was absent

usual u have three components

IBDatabase -> for connection
IBTransaction -> for TransactionControl
IBQuery -> for DDL/DML SQL-Statements

simplest use

IBQuery.ExecSQL;
IBTransaction.Commit;  

// IBTransaction must assigned at the property Transaction of the IBQuery
//usual an assgniment should be enough to commit automatically
//if the properties of the IBTransaction are left as default
//<-- means no explicit commit must be done

hope thats it

meikl ;-)
0
 
LVL 15

Author Comment

by:mikelittlewood
ID: 10679802
Got it working :)

thx again ... I just need that odd poke in the right direction sometimes :)
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question