DAO Required?

M

MikeC

I currently have a procedure, written using DAO, that
creates a user-defined property of a Microsoft Jet
database. Of all of the procedures in my database, this
is the only one that uses DAO. If possible, I would like
convert the procedure to ADO and uncheck MS DAO 3.6 in
References.

Can anyone tell me whether ADO can be used to
create/delete a user-defined property of a Jet Database?

Thanks.

Mike
 
D

Douglas J. Steele

ADO is strictly a data access method. Database properties aren't actually
data, so I don't believe you can use ADO to work with them.

On the other hand, what's your objection to DAO? If you're strictly using
Jet databases, DAO is preferable to ADO. DAO was designed specifically to
use with Jet databases. When you use ADO, you add additional layers of
abstraction. As well, there are other things that you can only do using DAO.
 
M

MikeC

Thanks Doug.

My objection is not a major one. The application
noticeably opens more slowly when the MS DAO 3.6 reference
is checked. Since I have only one procedure using this
reference, I wanted to see if I could find a way to
eliminate the reference and thereby make the application
open a little faster. The slower opening is not a
problem. Just fine tuning.

Thanks for the info.
 
S

Stephen Rasey

Is it slow just opening with the DAO reference, or is it slow checking the
user defined property?

I agree that Opening a QueryDef takes a surprising amount of time. But that
is the nature of the database, not the DAO, I think.

Stephen Rasey
 
M

MikeC

Stephen,

The database opens faster with the DAO reference not
checked. This is without executing the procedure
containing the DAO code. My assumption has been that the
reference library requires a certain amount of time to
load.

I just wanted to eliminate the load time if I could find
an alternative method to set my user-defined property in
the Jet database.

I suppose another alternative could be to programmatically
uncheck the DAO reference whenever I close the database
and then re-check it whenever I need to compile or execute
the DAO code, but I really don't think it's worth the
effort. The time savings would be marginal.
 
D

Dirk Goldgar

MikeC said:
Thanks Doug.

My objection is not a major one. The application
noticeably opens more slowly when the MS DAO 3.6 reference
is checked. Since I have only one procedure using this
reference, I wanted to see if I could find a way to
eliminate the reference and thereby make the application
open a little faster. The slower opening is not a
problem. Just fine tuning.

Thanks for the info.

I've never heard of the presence or absence of the DAO reference making
a noticeable difference in the load time of a database. I wonder why
it's doing that. Is the object library stored on a network drive
somewhere?

It could be that you rewrite your procedure using late binding. That
would make the procedure run more slowly, but save having the reference
in your database. Do you want to post the code for the procedure?
 

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