By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,234 Members | 1,844 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,234 IT Pros & Developers. It's quick & easy.

How to make multiple queries an atomic transaction?

P: n/a
ewu
Hello,

I am trying to implement a tree-structure data set on Microsoft Access
using Joe Celko's nested sets (see
http://www.intelligententerprise.com...0/celko.shtml). According
to Joe Celko, to insert a node into the tree, one has to UPDATE the
ranges first and then INSERT the node. These queries should be
atomic. Is there a way in Access to makes these queries atomic? If I
use ASP 3.0 to manipulate the database, is there a way to achieve this
in ASP?

Thanks,

Eric Wu
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Forgive me for sounding a little simple but surely the DAO
BeginTrans/CommitTrans/RollbackTrans methods will do this?

e.g.

Dim wkCurrent As DAO.Workspace
Dim dbCurrent As DAO.Database
Dim qdfQuery As DAO.QueryDef

Set wkCurrent = Workspaces(0)
Set dbCurrent = wkCurrent.Databases(0)

wkCurrent.BeginTrans

Set qdfQuery = dbCurrent.QueryDefs("YourFirstQueryName")

qdfQuery.Execute

Set qdfQuery = dbCurrent.QueryDefs("YourSecondQueryName")

qdfQuery.Execute

wkCurrent.CommitTrans
"ewu" <ne*****@excite.com> wrote in message
news:e9**************************@posting.google.c om...
Hello,

I am trying to implement a tree-structure data set on Microsoft Access
using Joe Celko's nested sets (see
http://www.intelligententerprise.com...0/celko.shtml). According
to Joe Celko, to insert a node into the tree, one has to UPDATE the
ranges first and then INSERT the node. These queries should be
atomic. Is there a way in Access to makes these queries atomic? If I
use ASP 3.0 to manipulate the database, is there a way to achieve this
in ASP?

Thanks,

Eric Wu

Nov 12 '05 #2

P: n/a
ewu
Thanks. This is what I am looking for. I doubt if Microsoft Access
provides similar functionality. But methods in ADO Connection already
solve the problem. Thanks again for your answer and your code.

Eric

"Ben Eaton" <be************@hotmail.com> wrote in message news:<bn***********@news.wplus.net>...
Forgive me for sounding a little simple but surely the DAO
BeginTrans/CommitTrans/RollbackTrans methods will do this?

e.g.

Dim wkCurrent As DAO.Workspace
Dim dbCurrent As DAO.Database
Dim qdfQuery As DAO.QueryDef

Set wkCurrent = Workspaces(0)
Set dbCurrent = wkCurrent.Databases(0)

wkCurrent.BeginTrans

Set qdfQuery = dbCurrent.QueryDefs("YourFirstQueryName")

qdfQuery.Execute

Set qdfQuery = dbCurrent.QueryDefs("YourSecondQueryName")

qdfQuery.Execute

wkCurrent.CommitTrans
"ewu" <ne*****@excite.com> wrote in message
news:e9**************************@posting.google.c om...
Hello,

I am trying to implement a tree-structure data set on Microsoft Access
using Joe Celko's nested sets (see
http://www.intelligententerprise.com...0/celko.shtml). According
to Joe Celko, to insert a node into the tree, one has to UPDATE the
ranges first and then INSERT the node. These queries should be
atomic. Is there a way in Access to makes these queries atomic? If I
use ASP 3.0 to manipulate the database, is there a way to achieve this
in ASP?

Thanks,

Eric Wu

Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.