Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 268
  • Last Modified:

Events using ENUM paremeters in Access97

Setup: NT, Access97, ADO2.6
I'm trying to use the ADO Events on the connection object (declared using the WithEvents Keyword)

My dilemma: when I properly declare an event such as...
Private Sub Con_Disconnect(adStatus As ADODB.EventStatusEnum, pConnection As ADODB.Connection)
End Sub

I get an error "Type not supported in Visual Basic"

on the other side, when I try to change the event declaration to a LONG data type instad of the EventStatusEnum (which I know is not supported in access 97), I get the error "Event procedure declaration doesn't match description of event having same name"

is there a workaround, or is it just not possible to use events that contain enumerated parameters in A97?
0
zorkym
Asked:
zorkym
1 Solution
 
LambertHeenanCommented:
So you have a class with something like

Private WithEvents Con As ADODB.Connection

and then you need to define the event handler for the Disconnect event, yes?

In which case I do believe that you are stuck. The ADO type library defines the various event handlers and their parameters, and so it insists that the Disconnect event uses an Enum type parameter, which VBA in A97 simply does not support. This is not even one of those cases where you can fake an Enum by defining a bunch of constant values.

;-(
0
 
zorkymAuthor Commented:
not the answer I like, but I think it's correct.
thanks.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now