473,378 Members | 1,420 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Help with ADO Connection needed please

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
1 1268
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: *** HAWK | last post by:
I'm trying to make a music CD webpage (eg hmv.com) using ASP. I want it to follow these guidelines: All visitors should be able to obtain a list of 1 - all CDs in the database listed by A-Z by...
7
by: Aaron | last post by:
Complete code follows. I am new to .NET programming (and programming in general) and I am having a difficult time understanding how to fill a variable in one sub, and then access it from...
0
by: Edwinah63 | last post by:
Hi guys, i am not new to vb6, but a mere tyro in vb.net what i want to do is the following open transaction build an ADODB command object using parameters execute it build another command...
7
by: Mahesh Devjibhai Dhola | last post by:
Hi, I want to develop p2p (peer-to-peer) communication connection for chat in ..Net (Lang: c# - preferable) NOTE: if two LAN are behind their own router then also it should work as yahoo, msn...
5
by: Hexman | last post by:
I've come up with an error which the solution eludes me. I get the error: >An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in HRTest.exe > >Additional...
16
by: crbd98 | last post by:
Hello All, Some time ago, I implemented a data access layer that included a simple connectin pool. At the time, I did it all by myself: I created N connections, each connection associated with...
0
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
5
by: Glen Buell | last post by:
Hi all, I have a major problem with my ASP.NET website and it's SQL Server 2005 Express database, and I'm wondering if anyone could help me out with it. This site is on a webhost...
1
by: teddymeu | last post by:
hi guys I posted the other day regarding a solution i needed to design, im new to development an asp,net and built a local post office search tool using asp.net 2. vb in visual studio, using an...
13
by: Jennifer.Berube | last post by:
well I'm not sure how to go about making my SQL connection string... The code below is what I need to replace with my SQL connection...I just don't know if that code is for DSN or access... I...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.