Stacking Transactions

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

Stacking Transactions

Postby Odysseus » Fri Jun 18, 2004 4:19 pm

Is it possible to "stack" transactions

situation:
user clicks edit
I start a transaction & open the selected record in a dialog (showformdialog)
The OK button that closes the dialog box, commits the transaction, the cancel rolls back
So far so good, working perfectly
Now inside this dialog I have added a tabform with related records which I can edit I the same window
This editing I would like to do in a separate transaction which I can commit or rollback when the user clicks on the appropriate button and I return to the first form in the dialog

So is it possible to stack the transaction, or do I need to find another way?

Hope this makes any sence
:roll:
Odysseus

Citizen of Old Europe
Odysseus
 
Posts: 205
Joined: Wed Sep 10, 2003 9:34 pm
Location: Belgium

Postby bcusick » Fri Jun 18, 2004 7:16 pm

Odysseus,

Here's the good news - you don't need to "stack" transactions. A single transaction can cross multiple tables/forms.

When you rollback the transaction - it rolls back in the tabpanel as well.

Give it a try! :)

Bob Cusick
bcusick
 
Posts: 1255
Joined: Wed Apr 23, 2003 11:27 pm
Location: Thousand Oaks, CA USA

Postby Odysseus » Fri Jun 18, 2004 8:29 pm

I know and that's exactly what I don't want to happen.

I would like to be able to start a transaction,change something to this record, without commiting open a related record (the "stacked" one), start a transaction, change something, rollback, commit the first record.

Well I suppose that won't happen and I'll have to look for myself wether a record is dirty and save or cancel. It just looks like a lot of work for something that could be done with "stacked" transaction.

I'm probably just to lazy 8) 8)
Odysseus

Citizen of Old Europe
Odysseus
 
Posts: 205
Joined: Wed Sep 10, 2003 9:34 pm
Location: Belgium

Postby Jan Blok » Thu Jun 24, 2004 11:26 am

What you want is called transaction savepoints, those are not supported by all databases, so we don't know a way yet to provide this in Servoy.
Jan Blok
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam

Postby Odysseus » Thu Jun 24, 2004 11:40 am

Keep Thinking :wink:

So for now, I'll just have to find another way

THX
Odysseus

Citizen of Old Europe
Odysseus
 
Posts: 205
Joined: Wed Sep 10, 2003 9:34 pm
Location: Belgium


Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 28 guests