473,657 Members | 2,418 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Transactions in Access 2000

Hi.

I need to use transactions to make sure data is consistent. I have a
combo box that when changed to a new value updates a table. I then
have a DoCmd.RunSQL statement following that in the same Sub. I would
like for it for those two things to be wrapped up in one transaction,
with the user being informed that a transaction has rolled back.

I have not implimented transaction in Access so code bits would be
helpful to me. I am also trying to avoid using any References like ADO
as to make the db as portable between Access versions greater than
2000.

Thank you in advance.

Feb 10 '06 #1
7 2474
Karen Hill wrote:
Hi.

I need to use transactions to make sure data is consistent. I have a
combo box that when changed to a new value updates a table. I then
have a DoCmd.RunSQL statement following that in the same Sub. I would
like for it for those two things to be wrapped up in one transaction,
with the user being informed that a transaction has rolled back.

I have not implimented transaction in Access so code bits would be
helpful to me. I am also trying to avoid using any References like ADO
as to make the db as portable between Access versions greater than
2000.


You'll have to abandon the DoCmd.RunSQL and use either the DAO or ADO Object
Model (which means setting a reference) but if you use ADO you shouldn't
have a portability problem.

You'll have to search for a transaction code sample. I'm familiar with
transactions in DAO but not ADO.

--
'---------------
'John Mishefske
'---------------
Feb 10 '06 #2
John Mishefske <jm**********@S PAMyahoo.com> wrote in
news:kn******** ******@tornado. rdc-kc.rr.com:
Karen Hill wrote:
Hi.

I need to use transactions to make sure data is consistent. I
have a combo box that when changed to a new value updates a
table. I then have a DoCmd.RunSQL statement following that in
the same Sub. I would like for it for those two things to be
wrapped up in one transaction, with the user being informed that
a transaction has rolled back.

I have not implimented transaction in Access so code bits would
be helpful to me. I am also trying to avoid using any References
like ADO as to make the db as portable between Access versions
greater than 2000.
You'll have to abandon the DoCmd.RunSQL and use either the DAO or
ADO Object Model (which means setting a reference) but if you use
ADO you shouldn't have a portability problem.


Eh? DAO will solve the portability problem, not ADO, which was not
natively supported in any version of Access before 2000.
You'll have to search for a transaction code sample. I'm familiar
with transactions in DAO but not ADO.


I don't understand why anyone would contemplate doing something as
"close to the metal" as transactions in anything but the db engine's
native data access language, in this case, DAO.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Feb 11 '06 #3
On Fri, 10 Feb 2006 19:03:54 -0600, "David W. Fenton"
<XX*******@dfen ton.com.invalid > wrote:

Oh, come on. Show us one case where ADO transactions don't work and
DAO ones do.

-Tom.

John Mishefske <jm**********@S PAMyahoo.com> wrote in
news:kn******* *******@tornado .rdc-kc.rr.com:
Karen Hill wrote:
Hi.

I need to use transactions to make sure data is consistent. I
have a combo box that when changed to a new value updates a
table. I then have a DoCmd.RunSQL statement following that in
the same Sub. I would like for it for those two things to be
wrapped up in one transaction, with the user being informed that
a transaction has rolled back.

I have not implimented transaction in Access so code bits would
be helpful to me. I am also trying to avoid using any References
like ADO as to make the db as portable between Access versions
greater than 2000.


You'll have to abandon the DoCmd.RunSQL and use either the DAO or
ADO Object Model (which means setting a reference) but if you use
ADO you shouldn't have a portability problem.


Eh? DAO will solve the portability problem, not ADO, which was not
natively supported in any version of Access before 2000.
You'll have to search for a transaction code sample. I'm familiar
with transactions in DAO but not ADO.


I don't understand why anyone would contemplate doing something as
"close to the metal" as transactions in anything but the db engine's
native data access language, in this case, DAO.


Feb 11 '06 #4
David W. Fenton wrote:
John Mishefske <jm**********@S PAMyahoo.com> wrote in
I need to use transactions to make sure data is consistent. I
have a combo box that when changed to a new value updates a
table. I then have a DoCmd.RunSQL statement following that in
the same Sub. I would like for it for those two things to be
wrapped up in one transaction, with the user being informed that
a transaction has rolled back.

I have not implimented transaction in Access so code bits would
be helpful to me. I am also trying to avoid using any References
like ADO as to make the db as portable between Access versions
greater than 2000.


You'll have to abandon the DoCmd.RunSQL and use either the DAO or
ADO Object Model (which means setting a reference) but if you use
ADO you shouldn't have a portability problem.

Eh? DAO will solve the portability problem, not ADO, which was not
natively supported in any version of Access before 2000.


Agreed. But the poster mentioned A2000 and later.
You'll have to search for a transaction code sample. I'm familiar
with transactions in DAO but not ADO.

I don't understand why anyone would contemplate doing something as
"close to the metal" as transactions in anything but the db engine's
native data access language, in this case, DAO.


I agree personally but could not authoritatively state that ADO is a bad choice.

--
'---------------
'John Mishefske
'---------------
Feb 11 '06 #5
Tom van Stiphout <no************ *@cox.net> wrote in
news:8k******** *************** *********@4ax.c om:
Oh, come on. Show us one case where ADO transactions don't work
and DAO ones do.


I didn't say they didn't. I just said I see no benefit to use ADO in
a situation where you're using Jet.

Now, if you're contemplating changing away from Jet as your data
store, that's a different story, but no one has mentioned that as
one of the issues in play.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Feb 11 '06 #6
John Mishefske <jm**********@S PAMyahoo.com> wrote in
news:Tb******** ********@tornad o.rdc-kc.rr.com:
David W. Fenton wrote:
John Mishefske <jm**********@S PAMyahoo.com> wrote in
You'll have to abandon the DoCmd.RunSQL and use either the DAO or
ADO Object Model (which means setting a reference) but if you use
ADO you shouldn't have a portability problem.


Eh? DAO will solve the portability problem, not ADO, which was
not natively supported in any version of Access before 2000.


Agreed. But the poster mentioned A2000 and later.


But there is absolutely no portability problem with DAO in A2K and
later, so the comment makes no sense at all in the context of A2K
and higher. That's why I read it as referring to pre-A2K.
You'll have to search for a transaction code sample. I'm familiar
with transactions in DAO but not ADO.

I don't understand why anyone would contemplate doing something
as "close to the metal" as transactions in anything but the db
engine's native data access language, in this case, DAO.


I agree personally but could not authoritatively state that ADO is
a bad choice.


In my opinion, it's a bad choice for any all-Jet application, even
if it would work just fine. The only thing worse than completely
replacing DAO with ADO in a Jet application would be mixing some DAO
and some ADO.

In a Jet context, there is simply no reason to use ADO for anything
that DAO can actually do. So far as I know there are only two things
ADO can do that Jet can't, and both of them have alternative
solutions that don't require ADO at all.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Feb 11 '06 #7
Tom van Stiphout wrote:
On Fri, 10 Feb 2006 19:03:54 -0600, "David W. Fenton"
<XX*******@dfen ton.com.invalid > wrote:

Oh, come on. Show us one case where ADO transactions don't work and
DAO ones do.


Hi Tom,

Not transaction related, but I was bitterly, bitterly disappointed with
ADO for mdbs written against my normal back end, Oracle. I'd heard so
much about DSNless connections over a number of years here and when I
finally jumped into A2003 from A97 a year-and-a-half ago, I excitedly
looked into it. I write a lot of Access FE reporting applications for a
local network, but ADO recordsources are not compatible with Access
reports. 8(

--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "What's UP, Dittoooooo?" - Ditto
Feb 12 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2600
by: gabriel | last post by:
Greetings, I am adding foreign keys to a database and saving the generated scripts. What I do not understand is that all script begin with empty transactions. Why ? Example follows : /*
8
5400
by: David Bray | last post by:
I have an Access database on an ISP's web-space which is accessed through ASP - all standard stuff. Can anyone tell me whether ASP's object.context methods for transactions will work with Access? My ASP reference talks about SQL Server and XA protocol databases but I have no idea as to whether Access is covered by the latter. Thanks
4
1347
by: RC | last post by:
I have a form where the user types the shipping container number into a box and then types the Pallet number into a combo box. The AfterUpdate event for the combo box runs the following code which finds every table row that has that pallet number in it and sets the container number in the next column to match the container number the user typed into the form. About 15 rows are changed because there are about 15 boxes in each pallet. ...
0
1089
by: Ryan | last post by:
I am trying to use transactions in Access97 and SQL Server 2000. A simplified version of the program I am writing in Access is as follows: Begin Transaction Begin Transaction Import File in Tble1 Commit Transaction Begin transaction Merge Table1 and tble2 commit transaction
11
12985
by: Mike P | last post by:
I've been using C# transactions for a while and had no problems with them. Using try catch blocks I can trap basically all possible errors and rollback all necessary data. Over the last few days I've been trying to convert some of this code to SQL Server stored procedures, but it seems to lack many of the benefits of C# transactions - a lot of the errors don't seem to be trapped by the SQL error trapping (e.g. if I do an update on a row...
2
2365
by: Adnan | last post by:
Hey Ppl, I'm developing an Online Auction Site using ASP.net and am experiencing a problem with Transactions in ADO.Net. When beginTrasaction() function is invoked from a specific connection, and insertions are made into a table, no other connection can access the table, until the transaction is committed. I've set the Isoloation level to ReadUncommited.
2
1901
by: Andreas | last post by:
Hi, will I need "nested transactions" which - as I read - aren't implemented, yet ? I have some objects that rely on each other. Each has a status like proposal, working, canceled. table-A <--- table-B <--- table-C <--- table-D
2
2693
by: Sridhar | last post by:
Hi, I am trying to implement sql transactions. But I am not knowing how to do that. I created a data access layer which contains methods to select/insert/update tables in a database. I have also created a business logic layer to retrieve/update the data from the data access layer. All of this is working fine if there are no transactions involved. If I need to use transactions, I am not knowing how to do that. Lets say I have a webform...
3
7082
by: psycho | last post by:
I am working on an N-tier application using following components: 1. Data Access Layer using DLINQ which consists of Data Context class and Table Mapping classes. 2. Business Logic Layer. 3. Presentation Layer (normal ASP.NET pages) The problem is that I have to handle database transactions which can span multiple tables. So where should I place the transaction code. I think I should do it in BLL. But how do I control the transaction at...
0
8402
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8315
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8508
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7341
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6172
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5633
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4323
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2733
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1962
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.