Re: ADOBD / JET Transaction Problems

From: Douglas J. Steele (NOSPAM_djsteele_at_NOSPAM_canada.com)
Date: 09/28/04


Date: Tue, 28 Sep 2004 18:03:17 -0400

I think it's probably more relevant to post the transaction-related code
you're using.

It looks as though you're trying to use both DAO and ADO concurrently. It
doesn't work that way: what you'll end up with is, in essence, two separate
threads that don't know anything about each other.

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"Gareth Sharp" <gs@paxsoft.co.uk> wrote in message
news:cjc0eu$2i$1$8302bc10@news.demon.co.uk...
> Hi all!
>
> Firstly, I am using VB5, a password protected Access 97 database, DAO3.6,
> and ADO2.8
>
> I am trying to overcome page level locking using an Access 97 database, by
> using ADODB to open the database to use record level locking.
>
> This seems to work fine, but the transactions seem to not be working
> properly.  If I use BeginTrans, then do 3 "INSERT INTO " queries, then
> Rollback, the Rollback does not Rollback the transactions - all 3 are
> processed, and committed to the datebase.  I have tried changing it to
> cnn.BeginTrans, etc.
>
> The following is the code that I am using to open the database - is there
> anything obviously wrong with this?
>
>     Global gCurDb As Database
>     Global wsDAO As DAO.Workspace
>     Global cnn As ADODB.Connection
>
> Public Sub OpenDB
>
>    Set cnn = New ADODB.Connection
>    cnn.Provider = "Microsoft.JET.OLEDB.4.0"
>    cnn.Properties("Data Source") = "v:\data\TestDatabase.mdb"
>    cnn.Properties("Jet OLEDB:Database Locking Mode") = 1 ' record level
> locking
>    cnn.CursorLocation = adUseServer
>    cnn.Properties("Jet OLEDB:Database Password") = "123456"
>    cnn.Open
>
>    Set wsDAO = DBEngine.CreateWorkspace("WorkSpace", "Admin", "",
dbUseJet)
>    Set gCurDb = wsDAO.OpenDatabase(DBFile, False, False, ";pwd=" &
> gDBPassWord)
>
> End Sub
>
>
> All the best!
> Gareth Sharp
> Technical Director
> Paxton Computers Ltd
> website: http://www.paxsoft.co.uk
> eMail: mailto:gs@paxsoft.co.uk
>
>


Relevant Pages

  • Re: ADOBD / JET Transaction Problems
    ... I think it's probably more relevant to post the transaction-related code ... > using ADODB to open the database to use record level locking. ... > Rollback, the Rollback does not Rollback the transactions - all 3 are ...
    (microsoft.public.vb.database.dao)
  • Re: Transaction Errors
    ... I didn't realize that the DBI version was so ... >>I keep getting this error when attempting to utilize a database that has Innodb ... >>Transactions not supported by database at module..... ... >>until the commit is called, of if an error occurs, the rollback is called. ...
    (perl.dbi.users)
  • Re: Using SqlTransaction with MSSQL Trans?
    ... I believe you will get separate transactions and transaction from the ... application will not be able to rollback changes in a database. ... Val Mazur ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Portents of VMS death
    ... "HP NonStop servers are at the top of the single-system ... databases for each primary database or a single backup for multiple ... no matter how many transactions per second your application ... processing can continue using the backup database with minimal service ...
    (comp.os.vms)
  • Rollforwarddb -e failure
    ... I've been running recovery tests for a contingency plan that I'm ... I've tried it so far on both my target platform (Tru64 5.1b with Ingres ... Create a database and create at least one table with some ... are any other uncommitted transactions with an earlier start time to be ...
    (comp.databases.ingres)