Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Userlist question

17 views
Skip to first unread message

Salad

unread,
Dec 10, 2009, 2:46:50 PM12/10/09
to
In the code to define and run UserList it starts out like
Sub ShowUserRosterMultipleUsers()
Dim cn As New ADODB.Connection
Dim cn2 As New ADODB.Connection
Dim rs As New ADODB.Recordset
...

This works well if one has defined a reference to the ADO library. But
what if one is running a MDE and can't set the reference? Is it
possible to create the routine so it can run?

Banana

unread,
Dec 10, 2009, 3:09:50 PM12/10/09
to

Maybe I'm not completely understanding the question, but you certainly
could set a ADO reference in the .MDB prior to compiling into a .MDE
file and it'd succeed, no? Besides one can't edit .MDE anyway, ADO or no
ADO.

Salad

unread,
Dec 10, 2009, 3:17:44 PM12/10/09
to
Banana wrote:

I don't know.

I guess I was wondering if there could be late binding or some method
used work with it or if a reference need to exist first.

Banana

unread,
Dec 10, 2009, 3:45:44 PM12/10/09
to
Salad wrote:
> I guess I was wondering if there could be late binding or some method
> used work with it or if a reference need to exist first.

Well, if you didn't want an explicit reference you could work through
CurrentProject object and use late binding.

But it's still going to require that we have the source .MDB regardless.

David W. Fenton

unread,
Dec 12, 2009, 4:01:50 PM12/12/09
to
Banana <Ban...@Republic.com> wrote in
news:4B215DF8...@Republic.com:

> Salad wrote:
>> I guess I was wondering if there could be late binding or some
>> method used work with it or if a reference need to exist first.
>
> Well, if you didn't want an explicit reference you could work
> through CurrentProject object and use late binding.

That would give you your connection object, and then you could use
generic object variables for all the result. You wouldn't need to
use CreateObject at all.

BTW, many don't know it, but you can do the same thing with DAO
(i.e., removing the reference) via the Access.Application object's
CurrentDB function/object or via its DBEngine object. I don't know
why anyone would do that, but the point is that Access exposes both
an ADO top-level object (via CurrentProject) and the DAO top-level
objects (via CurrentDB and DBEngine). You can see this by using the
object browser and searching for one of the objects selecting only
Access as the library to search.

> But it's still going to require that we have the source .MDB
> regardless.

For code, of course.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/

0 new messages