We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Am I missing a database update?

Mike Littlewood
on
Medium Priority
268 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)
Comment
Watch Question

Top Expert 2004

Commented:
yep, seems that a commit is missed
Mike LittlewoodEngineer

Author

Commented:
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?
Mike LittlewoodEngineer

Author

Commented:
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)
Top Expert 2004
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Mike LittlewoodEngineer

Author

Commented:
Got it working :)

thx again ... I just need that odd poke in the right direction sometimes :)
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.