|
-
July 31st, 2001, 08:57 AM
#1
Problem with BeginTrans / CommitTrans / RollbackTrans
Hi,
i have some problem using transactions (i am using adox). This works great. But locks-up tables. After a succussfull CommitTrans, even after rebooting the system, i cannot
1. deleted the table
2. Create a new field
(through code of course).
i get the message
"The database engine couldn't lock table 'activity' because it's already in use by another person or process."
If i comment all the transaction code, i can do everything!.
please help!
thanks
Sharath
-
July 31st, 2001, 09:31 AM
#2
Re: Problem with BeginTrans / CommitTrans / RollbackTrans
Beware: you cannot have nested transactions (was this the case?)
Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood,
Bruno Paris and all the other wonderful people who made and make Codeguru
a great place.
Come back soon, you Gurus.
The Rater
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
-
July 31st, 2001, 09:48 AM
#3
Re: Problem with BeginTrans / CommitTrans / RollbackTrans
Thanks. but i dont think so.
The code flow goes something like this.
(My connection object is a modular object in the class.BeginTrans and RollbackTrans are in two precedures!)
CreateOrOpen(strDatabase file), (which has mconAdoConnection.BeginTrans)
Trow up a progress bar with a cancel button
CreateTables (with basic fields)
Iterate through the collection of classes
Get each object in the collection
Iterate through the properties, same time check for the field in the table.
'This class is user customisable and user can add his own properties into this class)
Create the field if it does not exists!
Update Table
mconAdoConnection.CommitTrans
Meanwhile, i also check of the user has cancelled, if so i will call
mconAdoConnection.RollbackTrans
And finaly i have
mconAdoConnection.Close
Thanks a lot,
Sharath
-
July 31st, 2001, 11:12 AM
#4
Re: Problem with BeginTrans / CommitTrans / RollbackTrans
Are you catching all errors i.e. is the begintrans ALWAYS matched with a commit or rollback.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|