PC Review


Reply
Thread Tools Rate Thread

ADO events under Access 97

 
 
Archives
Guest
Posts: n/a
 
      17th Jun 2004
Hello,

Does anybody know how to use an ADO event under Access 97 ?

Since, we can't use the Enum type under Access 97, I try to replace
ADODB.EventStatusEnum by a Long type. So, I have this code:

Private Sub connEvent_ConnectComplete(ByVal pError As ADODB.Error, _
adStatus As Long, _
ByVal pConnection As ADODB.Connection)

But I get an error at the compilation. I checked this code under Access 2003
and all was fine.

Do you know how to code this event under Access 97 ?




 
Reply With Quote
 
 
 
 
Alex Dybenko
Guest
Posts: n/a
 
      17th Jun 2004
did you add a reference to ADO in access 97 mdb? pls check this

--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com


"Archives" <(E-Mail Removed)> wrote in message
news:cashoo$arl$(E-Mail Removed)...
> Hello,
>
> Does anybody know how to use an ADO event under Access 97 ?
>
> Since, we can't use the Enum type under Access 97, I try to replace
> ADODB.EventStatusEnum by a Long type. So, I have this code:
>
> Private Sub connEvent_ConnectComplete(ByVal pError As ADODB.Error, _
> adStatus As Long, _
> ByVal pConnection As ADODB.Connection)
>
> But I get an error at the compilation. I checked this code under Access

2003
> and all was fine.
>
> Do you know how to code this event under Access 97 ?
>
>
>
>



 
Reply With Quote
 
Archives
Guest
Posts: n/a
 
      17th Jun 2004
Yes I did (version 2.7). All the ADO methods and properties are OK. I can
connect a database, read some recordset but I can't compile an event.


"Alex Dybenko" <(E-Mail Removed)> a écrit dans le message de
news: (E-Mail Removed)...
> did you add a reference to ADO in access 97 mdb? pls check this
>
> --
> Alex Dybenko (MVP)
> http://Alex.Dybenko.com
> http://www.PointLtd.com
>
>
> "Archives" <(E-Mail Removed)> wrote in message
> news:cashoo$arl$(E-Mail Removed)...
> > Hello,
> >
> > Does anybody know how to use an ADO event under Access 97 ?
> >
> > Since, we can't use the Enum type under Access 97, I try to replace
> > ADODB.EventStatusEnum by a Long type. So, I have this code:
> >
> > Private Sub connEvent_ConnectComplete(ByVal pError As ADODB.Error, _
> > adStatus As Long, _
> > ByVal pConnection As ADODB.Connection)
> >
> > But I get an error at the compilation. I checked this code under Access

> 2003
> > and all was fine.
> >
> > Do you know how to code this event under Access 97 ?
> >
> >
> >
> >

>
>



 
Reply With Quote
 
Alex Dybenko
Guest
Posts: n/a
 
      18th Jun 2004
probably you have different ADO versions?

to make sure you insert correct proc declaration - use 2 top combos of class
module window to add proc

--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com


"Archives" <(E-Mail Removed)> wrote in message
news:casuda$a8o$(E-Mail Removed)...
> On two differents PC, I can't compile.
>
> "Declaration procedure doesn't match the event same name"
>
> "Alex Dybenko" <(E-Mail Removed)> a écrit dans le message

de
> news: (E-Mail Removed)...
> > have added a new class to access97, added following code there:
> >
> > Private WithEvents objcon As ADODB.Connection
> >
> > Private Sub objcon_ConnectComplete(ByVal pError As ADODB.Error, adStatus

> As
> > Long, ByVal pConnection As ADODB._Connection)
> > 'ok
> > End Sub
> >
> > class compiled ok at me, so looks ok for access 97.
> >
> > --
> > Alex Dybenko (MVP)
> > http://Alex.Dybenko.com
> > http://www.PointLtd.com
> >
> >
> >
> >
> > "Archives" <(E-Mail Removed)> wrote in message
> > news:casmki$i50$(E-Mail Removed)...
> > > Yes I did (version 2.7). All the ADO methods and properties are OK. I

> can
> > > connect a database, read some recordset but I can't compile an event.
> > >
> > >
> > > "Alex Dybenko" <(E-Mail Removed)> a écrit dans le

> message
> > de
> > > news: (E-Mail Removed)...
> > > > did you add a reference to ADO in access 97 mdb? pls check this
> > > >
> > > > --
> > > > Alex Dybenko (MVP)
> > > > http://Alex.Dybenko.com
> > > > http://www.PointLtd.com
> > > >
> > > >
> > > > "Archives" <(E-Mail Removed)> wrote in message
> > > > news:cashoo$arl$(E-Mail Removed)...
> > > > > Hello,
> > > > >
> > > > > Does anybody know how to use an ADO event under Access 97 ?
> > > > >
> > > > > Since, we can't use the Enum type under Access 97, I try to

replace
> > > > > ADODB.EventStatusEnum by a Long type. So, I have this code:
> > > > >
> > > > > Private Sub connEvent_ConnectComplete(ByVal pError As ADODB.Error,

_
> > > > > adStatus As Long, _
> > > > > ByVal pConnection As ADODB.Connection)
> > > > >
> > > > > But I get an error at the compilation. I checked this code under

> > Access
> > > > 2003
> > > > > and all was fine.
> > > > >
> > > > > Do you know how to code this event under Access 97 ?
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Archives
Guest
Posts: n/a
 
      18th Jun 2004
I have tryed to use the two top combos. When I select an event in the right
combo, it creates all the event but with the sub line in red. It is because
it uses "ByVal pConnection As ADODB._Connection" as last parameter instead
of "ByVal pConnection As ADODB.Connection".

When I remove the "_", I get a black line but I can't compile. Always the
same warning message.

I have tryed with version from 2.0 to 2.7 without result.


"Alex Dybenko" <(E-Mail Removed)> a écrit dans le message de
news: (E-Mail Removed)...
> probably you have different ADO versions?
>
> to make sure you insert correct proc declaration - use 2 top combos of

class
> module window to add proc
>
> --
> Alex Dybenko (MVP)
> http://Alex.Dybenko.com
> http://www.PointLtd.com
>
>
> "Archives" <(E-Mail Removed)> wrote in message
> news:casuda$a8o$(E-Mail Removed)...
> > On two differents PC, I can't compile.
> >
> > "Declaration procedure doesn't match the event same name"
> >
> > "Alex Dybenko" <(E-Mail Removed)> a écrit dans le

message
> de
> > news: (E-Mail Removed)...
> > > have added a new class to access97, added following code there:
> > >
> > > Private WithEvents objcon As ADODB.Connection
> > >
> > > Private Sub objcon_ConnectComplete(ByVal pError As ADODB.Error,

adStatus
> > As
> > > Long, ByVal pConnection As ADODB._Connection)
> > > 'ok
> > > End Sub
> > >
> > > class compiled ok at me, so looks ok for access 97.
> > >
> > > --
> > > Alex Dybenko (MVP)
> > > http://Alex.Dybenko.com
> > > http://www.PointLtd.com
> > >
> > >
> > >
> > >
> > > "Archives" <(E-Mail Removed)> wrote in message
> > > news:casmki$i50$(E-Mail Removed)...
> > > > Yes I did (version 2.7). All the ADO methods and properties are OK.

I
> > can
> > > > connect a database, read some recordset but I can't compile an

event.
> > > >
> > > >
> > > > "Alex Dybenko" <(E-Mail Removed)> a écrit dans le

> > message
> > > de
> > > > news: (E-Mail Removed)...
> > > > > did you add a reference to ADO in access 97 mdb? pls check this
> > > > >
> > > > > --
> > > > > Alex Dybenko (MVP)
> > > > > http://Alex.Dybenko.com
> > > > > http://www.PointLtd.com
> > > > >
> > > > >
> > > > > "Archives" <(E-Mail Removed)> wrote in message
> > > > > news:cashoo$arl$(E-Mail Removed)...
> > > > > > Hello,
> > > > > >
> > > > > > Does anybody know how to use an ADO event under Access 97 ?
> > > > > >
> > > > > > Since, we can't use the Enum type under Access 97, I try to

> replace
> > > > > > ADODB.EventStatusEnum by a Long type. So, I have this code:
> > > > > >
> > > > > > Private Sub connEvent_ConnectComplete(ByVal pError As

ADODB.Error,
> _
> > > > > > adStatus As Long, _
> > > > > > ByVal pConnection As ADODB.Connection)
> > > > > >
> > > > > > But I get an error at the compilation. I checked this code under
> > > Access
> > > > > 2003
> > > > > > and all was fine.
> > > > > >
> > > > > > Do you know how to code this event under Access 97 ?
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Alex Dybenko
Guest
Posts: n/a
 
      19th Jun 2004
i also have ByVal pConnection As ADODB.Connection , but compiled ok

--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com


"Archives" <(E-Mail Removed)> wrote in message
news:cav9t5$res$(E-Mail Removed)...
> I have tryed to use the two top combos. When I select an event in the

right
> combo, it creates all the event but with the sub line in red. It is

because
> it uses "ByVal pConnection As ADODB._Connection" as last parameter instead
> of "ByVal pConnection As ADODB.Connection".
>
> When I remove the "_", I get a black line but I can't compile. Always the
> same warning message.
>
> I have tryed with version from 2.0 to 2.7 without result.
>
>
> "Alex Dybenko" <(E-Mail Removed)> a écrit dans le message

de
> news: (E-Mail Removed)...
> > probably you have different ADO versions?
> >
> > to make sure you insert correct proc declaration - use 2 top combos of

> class
> > module window to add proc
> >
> > --
> > Alex Dybenko (MVP)
> > http://Alex.Dybenko.com
> > http://www.PointLtd.com
> >
> >
> > "Archives" <(E-Mail Removed)> wrote in message
> > news:casuda$a8o$(E-Mail Removed)...
> > > On two differents PC, I can't compile.
> > >
> > > "Declaration procedure doesn't match the event same name"
> > >
> > > "Alex Dybenko" <(E-Mail Removed)> a écrit dans le

> message
> > de
> > > news: (E-Mail Removed)...
> > > > have added a new class to access97, added following code there:
> > > >
> > > > Private WithEvents objcon As ADODB.Connection
> > > >
> > > > Private Sub objcon_ConnectComplete(ByVal pError As ADODB.Error,

> adStatus
> > > As
> > > > Long, ByVal pConnection As ADODB._Connection)
> > > > 'ok
> > > > End Sub
> > > >
> > > > class compiled ok at me, so looks ok for access 97.
> > > >
> > > > --
> > > > Alex Dybenko (MVP)
> > > > http://Alex.Dybenko.com
> > > > http://www.PointLtd.com
> > > >
> > > >
> > > >
> > > >
> > > > "Archives" <(E-Mail Removed)> wrote in message
> > > > news:casmki$i50$(E-Mail Removed)...
> > > > > Yes I did (version 2.7). All the ADO methods and properties are

OK.
> I
> > > can
> > > > > connect a database, read some recordset but I can't compile an

> event.
> > > > >
> > > > >
> > > > > "Alex Dybenko" <(E-Mail Removed)> a écrit dans le
> > > message
> > > > de
> > > > > news: (E-Mail Removed)...
> > > > > > did you add a reference to ADO in access 97 mdb? pls check this
> > > > > >
> > > > > > --
> > > > > > Alex Dybenko (MVP)
> > > > > > http://Alex.Dybenko.com
> > > > > > http://www.PointLtd.com
> > > > > >
> > > > > >
> > > > > > "Archives" <(E-Mail Removed)> wrote in message
> > > > > > news:cashoo$arl$(E-Mail Removed)...
> > > > > > > Hello,
> > > > > > >
> > > > > > > Does anybody know how to use an ADO event under Access 97 ?
> > > > > > >
> > > > > > > Since, we can't use the Enum type under Access 97, I try to

> > replace
> > > > > > > ADODB.EventStatusEnum by a Long type. So, I have this code:
> > > > > > >
> > > > > > > Private Sub connEvent_ConnectComplete(ByVal pError As

> ADODB.Error,
> > _
> > > > > > > adStatus As Long, _
> > > > > > > ByVal pConnection As ADODB.Connection)
> > > > > > >
> > > > > > > But I get an error at the compilation. I checked this code

under
> > > > Access
> > > > > > 2003
> > > > > > > and all was fine.
> > > > > > >
> > > > > > > Do you know how to code this event under Access 97 ?
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Where are Access Application Events? Yazeed Microsoft Access 1 17th Aug 2009 01:50 AM
Disable events in Access Frans Microsoft Access 7 17th Dec 2008 02:33 PM
Events in Access Sean Microsoft Access Forms 1 25th Jan 2008 01:47 PM
Sending Events from Access to Outlook with a Link back to Access David Carwile Microsoft Outlook VBA Programming 1 8th Jul 2004 02:38 PM
MS Access Events Jim Microsoft Access 1 9th Sep 2003 02:15 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:28 AM.