472,119 Members | 1,472 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,119 software developers and data experts.

What replaces Database/Recordset collection in Access XP?

Hello,

I'm hoping enough time has passed now that someone could tell me what
methods have replaced the Database / Workspace / TableDef collections in
Access XP. I've tried asking this question before, quite some time ago, but
have been told "Just throw in a reference to DAO and away you go". That's
not the answer I'm looking for.

I'd like to know how to reference a database or a tabledef "the new way",
but I can't seem to find out what "the new way" is because the Access help
file also contains all the old items as well. Any help or even a keyword
would be appreciated.

Thanks!
Jo
Nov 13 '05 #1
3 1626
Br
Jozef <NO****@NOSPAM.com> wrote:
Hello,

I'm hoping enough time has passed now that someone could tell me what
methods have replaced the Database / Workspace / TableDef collections
in Access XP. I've tried asking this question before,
quite some time ago, but have been told "Just throw in a reference to
DAO and away you go". That's not the answer I'm looking for.

I'd like to know how to reference a database or a tabledef "the new
way", but I can't seem to find out what "the new way" is because the
Access help file also contains all the old items as well. Any help
or even a keyword would be appreciated.

Thanks!
Jo


The newer versions of Access by default use ADO. You can easily use the
old DAO way of doing things by opening up a module and go into the menu
Tools/References and tick the reference to Microsoft DAO 3.6. If you
haven't "unticked" the ADO reference you'll need to let Access know
which Database/Recordset type you are using by adding a prefix
eg.
DIM myRS as DAO.Recordset
DIM myRS as ADODB.Recordset

The Access help explains both fairly clearly.
Look up the help contents for "Programming Information"/"Conversion"
--
regards,

Bradley

A Christian Response
http://www.pastornet.net.au/response
Nov 13 '05 #2
"Jozef" <NO****@NOSPAM.com> wrote in message
news:Ifane.1532585$6l.1449168@pd7tw2no...
Hello,

I'm hoping enough time has passed now that someone could tell me what
methods have replaced the Database / Workspace / TableDef collections in
Access XP. I've tried asking this question before, quite some time ago,
but have been told "Just throw in a reference to DAO and away you go".
That's not the answer I'm looking for.

I'd like to know how to reference a database or a tabledef "the new way",
but I can't seem to find out what "the new way" is because the Access help
file also contains all the old items as well. Any help or even a keyword
would be appreciated.

Thanks!
Jo


.... database or tabledef? You may find that to do what you want to do, you
may need to use more than one object library. If you needed a recordset
then you might use the ADODB.Recordset object, but for working with tables
you would use the ADOX.Table object. You could set a reference to these
libraries and explore their object models and (if it ever works) the help
file. Failing that, there is online help - for example if you want to write
new code without using the tabledef object, you could look here:
http://msdn.microsoft.com/library/de...ce10052000.asp
You should be aware that not everyone would agree that the DAO object model
has been replaced - there are still things which cannot be done with these
new libraries and even these have been replaced by objects under the .net
framework. Although these are not available for Access, many asp.net vb.net
applications are using the new object models. In short, there needs to be a
pretty convincing reason to replace DAO.TableDef objects with ADOX.Table
objects.
Nov 13 '05 #3
Thanks Justin, that's excellent!

That's the best explanation I've had.

Thank you.

Jo
"Justin Hoffman" <j@b.com> wrote in message
news:d7**********@nwrdmz02.dmz.ncs.ea.ibs-infra.bt.com...
"Jozef" <NO****@NOSPAM.com> wrote in message
news:Ifane.1532585$6l.1449168@pd7tw2no...
Hello,

I'm hoping enough time has passed now that someone could tell me what
methods have replaced the Database / Workspace / TableDef collections in
Access XP. I've tried asking this question before, quite some time ago,
but have been told "Just throw in a reference to DAO and away you go".
That's not the answer I'm looking for.

I'd like to know how to reference a database or a tabledef "the new way",
but I can't seem to find out what "the new way" is because the Access
help file also contains all the old items as well. Any help or even a
keyword would be appreciated.

Thanks!
Jo


... database or tabledef? You may find that to do what you want to do,
you may need to use more than one object library. If you needed a
recordset then you might use the ADODB.Recordset object, but for working
with tables you would use the ADOX.Table object. You could set a
reference to these libraries and explore their object models and (if it
ever works) the help file. Failing that, there is online help - for
example if you want to write new code without using the tabledef object,
you could look here:
http://msdn.microsoft.com/library/de...ce10052000.asp
You should be aware that not everyone would agree that the DAO object
model has been replaced - there are still things which cannot be done with
these new libraries and even these have been replaced by objects under the
.net framework. Although these are not available for Access, many asp.net
vb.net applications are using the new object models. In short, there
needs to be a pretty convincing reason to replace DAO.TableDef objects
with ADOX.Table objects.

Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Jules | last post: by
3 posts views Thread by scottallenmccullough | last post: by
30 posts views Thread by fniles | last post: by
13 posts views Thread by craigchalmers | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.