Updating after an insert (1 Viewer)

ryetee

Registered User.
Local time
Today, 15:47
Joined
Jul 30, 2013
Messages
952
I have some code which allows for backing out updates. It starts off with a DBEngine.BeginTrans and end with either a DBEngine.CommitTrans or DBEngine.Rollback depending upon the user.

This has been working great for 99% of my needs. I can't claim the praise for this as I got it off a thread here.

Where I'm getting stuck is as follows.

I want to insert a record into a table and directly after update it. The reason I'm doing this is one of the fields is for the insert is NULL on the form until I actually get the ID for the inserted record. So any ideas how I can update a record that hasn't yet been committed?
 

Minty

AWF VIP
Local time
Today, 15:47
Joined
Jul 26, 2013
Messages
10,354
Until it's saved you can't update it as it doesn't actually exist...

This sounds like a description for a Klien bottle
 

ryetee

Registered User.
Local time
Today, 15:47
Joined
Jul 30, 2013
Messages
952
Until it's saved you can't update it as it doesn't actually exist...

This sounds like a description for a Klien bottle
Thought so, so scrapped it and did it after the commit.
You mean Klein bottle do you. Is that like a mobius strip!!?
 

Minty

AWF VIP
Local time
Today, 15:47
Joined
Jul 26, 2013
Messages
10,354
Yup - Typo's r Us :)

I think therefore I Am....
not a politician
 

Users who are viewing this thread

Top Bottom