By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,461 Members | 1,120 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,461 IT Pros & Developers. It's quick & easy.

What replaces Database/Recordset collection in Access XP?

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
"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

P: n/a
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.