[AccessD] Access 2010 Data Macros

Jim Lawrence accessd at shaw.ca
Thu Aug 26 19:22:03 CDT 2010


Hi All:

Please ignore the following post as it in no way relates to the YouTube
video that it was supposed to. Reading to fast, too old, bad eyes...any or
all the explanations are probably right but I can not remember.

Jim


  

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence
Sent: Thursday, August 26, 2010 4:34 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Access 2010 Data Macros

Hi Asger:

Sorry for being so late to this question but without doing further
investigation it appears to be suggestion it works like an ADO call to the
database. (There is no equivalent feature within DAO.) 

ADO database has transaction methods as shown but a RollbackTrans can be
triggered on a DB error. Great for resolving situations when a group of
related data changes must all complete without an error or error situation
before a transaction or group of transactions are actually committed.

Below is a real simple sample I just cut and pasted out of an article...  

Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset

. . . 
' Open connection.
cn.Open

' Open titles table.
rs.Open "SELECT * FROM titles", Cn, adOpenDynamic, adLockPessimistic
. . .
' Begin the transaction.
rs.MoveFirst
cn.BeginTrans

' User loops through the recordset making changes.
. . . 
' Ask if the user wants to commit all the changes made.
If MsgBox("Save all changes?", vbYesNo) = vbYes Then
   cn.CommitTrans
Else
   cn.RollbackTrans
End If


HTH somewhat.
Jim




-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Asger Blond
Sent: Wednesday, August 18, 2010 4:31 PM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Access 2010 Data Macros

Hi group,
Any of you been playing with this new feature?
Data Macros in A2010 is supposed to function similar to triggers in SQL
Server.
So I expected the feature to be able to automate something like this: cancel
an order detail record if the item amount exceeds the stock available in a
stock table.
Which doesn't seem to be the case: the functions exposed narrow down to the
very few standard Jet-functions and doesn't include the needed
Access-functions for lookup and aggregation.
And worse: Can't get this feature working for me at all. Tried a simple
exercise reproducing the simple example in:
http://www.youtube.com/watch?v=J3G0ivjpy9k
- result: nothing ...
So any experience with this feature is appreciated.
Asger


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list