Jim Lawrence
accessd at shaw.ca
Thu Aug 26 18:34:02 CDT 2010
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