Solved

Am I missing a database update?

Posted on 2004-03-25
5
216 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 50 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

690 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