Errors in Compiling BeginTransComplete in Access 97

D

Dave L

Hi,

I am using Access 97 & ADO 2.7 to connect to an Oracle Database. Access is
beign used as a programming environment and nothing else.

Many of the SQL statements I want to execute are grouped into Transactions
and as such I would like to be able to determin whether a Transaction is
currently open. I am trying to do this using the ADO events
BeginTransComplete, CommitTransComplete and RollBackTransComplete.

The problem I have is with the compilation of the Event Declarations in
Access 97. All three events show the same behavior so I'll just use
BeginTransComplete as my example.

This is my Event Declaration - in my 'Class' module:
Private Sub oConn_BeginTransComplete(ByVal TransactionLevel As Long, ByVal
pError As ADODB.Error, adStatus As Long, ByVal pConnection As
ADODB._Connection)

Where oConn is an ADODB.Connection Object and has been Declared 'With Events'.

If I use the two Drop Down boxes at the top of the VBA IDE the declare
statement is accepted by Access, compiles and Runs fine. However if I try to
type the decalre statement, Access tells me that the '_' in
'ADODB._Connection' is an 'Invalid Character' but removing the '_'
invalidates the statement.

This problem is compounded as I am working as part of a development Team and
we are using Office 07 Developer Tools to integrate with a 'Source Code
Control' Tool and each time that a developer 'Checks Out' the class with the
event we have to delete the event code and rebuild it using the drop downs to
resolve the problem.

Does anyone know any workarounds for this which would allow us to continue
using these events rather than using a different method of tracking the state
of Transactions.

TIA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top