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

Help with ADO Connection needed please

P: n/a
I have newly acquired Ms Access 2003 after working for a number of years
with Access 97. In that edition I used VBA quite extensively for updating
recordsets under DAO protocols. Now I find that DAO formats don't work if I
construct them in this edition of Access.

What I want to know please is how I can get the program to create the
'connection' required in ADO so that I can continue to use constructs and
similar methods to those that I used previously. I am sorry if there is an
'obvious' solution, but if such is the case then I am afraid my brain has
been denied access to the secret (no pun intended). What I would like is a
simple bit of code that enables me to get to the stage where I can write
simple code of the following nature:

set rs01 = dbOpenrecordset("TableOfData")
Do While Not rs01.EOF
etc etc

Any help would be gratefully received...

Jon
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
je**@btopenworld.com wrote in message
<11*************@spool6-east.superfeed.net> :
I have newly acquired Ms Access 2003 after working for a number of years
with Access 97. In that edition I used VBA quite extensively for updating
recordsets under DAO protocols. Now I find that DAO formats don't work if I
construct them in this edition of Access.

What I want to know please is how I can get the program to create the
'connection' required in ADO so that I can continue to use constructs and
similar methods to those that I used previously. I am sorry if there is an
'obvious' solution, but if such is the case then I am afraid my brain has
been denied access to the secret (no pun intended). What I would like is a
simple bit of code that enables me to get to the stage where I can write
simple code of the following nature:

set rs01 = dbOpenrecordset("TableOfData")
Do While Not rs01.EOF
etc etc

Any help would be gratefully received...

Jon


This is strange, as the DAO references should be on by default in 2003,
so any valid DAO code should work ...

What you probably need, is disambiguating your declarations, so that
Access/VBA can distinguish between DAO and ADO (both are on by
default)

dim rs as dao.recordset
dim db as dao.database

set db = currentdb ' or dbengine(0)(0)
set rs = db.openrecordset("<your sql or table name ...>")

--
Roy-Vidar

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.