Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Action Queries - Partial Completion, Enforcing Transaction Control 1

Status
Not open for further replies.

mordja

Programmer
Apr 27, 2004
294
GB

Hi,

I have a daily process where I append a data set to a table. Following the append I mark the data set as having been appended. The problem is that If I turn warnings off, the append can partially complete. If a record is missing a required value it is not appended. However my update query marks it as being appended. Two questions:

1) With warnings off How can I enfore access to complete the entire append or none at all (no partial completion) ?

2) When warnings are on, and an append violates some column constraint, access warns you and asks whether you wish to continue, how can you capture this information programatically ?

I have the query property Use Transaction set to yes, but this does not seem to stop partial completion.

Thanks

Mordja
 
Use code to run your query.

qryMyquery.execute, dbfailonerror
if err<>0 then .....

The dbfailonerror option will provide "all or nothing" operation.
 
Hi

There is a Transaction Begin / Transaction End in Jet DAO

It is a method of the workspace

so

Ws.BeginTrans
... various Db.Executes
Ws.Commit


Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top