472,353 Members | 2,080 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

ADO and DAO together in same application?

I'm sure I saw this somewhere, but I'm not finding it now. I'm using Access
XP. Some time ago I decided to go with DAO instead of ADO. Earlier today I
found a very cool article at The Access Web at
http://www.mvps.org/access/forms/frm0047.htm about having the background
color change for the current record. I don't know ADO but I know **some**
DAO. I suspect the code on that page is ADO, though it looks a little like
DAO. I incorporated the code from that page exactly per the instructions
and changed the KeyName and KeyValue to reflect the name of my primary key.
I'm getting the error saying, "Member or data member not found."

So I changed "Dim RS As Recordset" to "Dim RS As DAO.Recordset" and that got
the first record to highlight somewhat correctly but then the rest of the
records didn't work. Maybe it is DAO because when I changed it to "Dim RS
As ADODB.Recordset" I got the original error ("Member or data member not
found.") I'm wondering if maybe I disabled ADO at some point. I had to go
into references to reinable DAO in the first place. Maybe I also disabled
ADODB.

What do I need to enable in the references to run both DAO and ADO in the
same form? Is it even possible? I currently run my own DAO code
successfully but I have never successfully attempted ADO. If this has
already been covered (I suspect it probably has) could somebody point me to
the place where I could learn about running them both and what references I
will need? Also, if this page does describe DAO code rather than ADO, I
have something else wrong.

Thank you so much.

Rich Hollenbeck

Thanks.
Nov 13 '05 #1
2 1833
There's really nothing special you need to do to use ADO and DAO together,
other than disambigulating references for objects that exist in both models.
(The list of objects with the same names in the 2 models is Connection,
Error, Errors, Field, Fields, Parameter, Parameters, Property, Properties
and Recordset).

Having said that, the code in that example is strictly DAO (it's Access 97,
and no reference has been set to ADO)

Maybe if you went into a little more details about what "highlight somewhat
correctly but then the rest of the
records didn't work" means, we might be able to help you.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"Richard Hollenbeck" <ri****************@verizon.net> wrote in message
news:vZmNd.18583$uc.3707@trnddc03...
I'm sure I saw this somewhere, but I'm not finding it now. I'm using
Access
XP. Some time ago I decided to go with DAO instead of ADO. Earlier today
I
found a very cool article at The Access Web at
http://www.mvps.org/access/forms/frm0047.htm about having the background
color change for the current record. I don't know ADO but I know **some**
DAO. I suspect the code on that page is ADO, though it looks a little
like
DAO. I incorporated the code from that page exactly per the instructions
and changed the KeyName and KeyValue to reflect the name of my primary
key.
I'm getting the error saying, "Member or data member not found."

So I changed "Dim RS As Recordset" to "Dim RS As DAO.Recordset" and that
got
the first record to highlight somewhat correctly but then the rest of the
records didn't work. Maybe it is DAO because when I changed it to "Dim RS
As ADODB.Recordset" I got the original error ("Member or data member not
found.") I'm wondering if maybe I disabled ADO at some point. I had to
go
into references to reinable DAO in the first place. Maybe I also disabled
ADODB.

What do I need to enable in the references to run both DAO and ADO in the
same form? Is it even possible? I currently run my own DAO code
successfully but I have never successfully attempted ADO. If this has
already been covered (I suspect it probably has) could somebody point me
to
the place where I could learn about running them both and what references
I
will need? Also, if this page does describe DAO code rather than ADO, I
have something else wrong.

Thank you so much.

Rich Hollenbeck

Thanks.

Nov 13 '05 #2
On Sun, 06 Feb 2005 11:13:31 GMT, Richard Hollenbeck
<ri****************@verizon.net> wrote:
So I changed "Dim RS As Recordset" to "Dim RS As DAO.Recordset" and that
got
the first record to highlight somewhat correctly but then the rest of the
records didn't work. Maybe it is DAO because when I changed it to "Dim
RS
As ADODB.Recordset" I got the original error ("Member or data member not
found.")


In addition to what Douglas Steele said, note that:

1. While you can use both ADO and DAO easily together, you cannot just
willy-nilly mix objects - an ADO recordset is and always will be an ADO
recordset. It is a created object.

2. The FindFirst method should be a dead giveaway. ADO has no FindFirst.
Darryl Kerkeslager
Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Max | last post by:
Hi All, I am developing an application that needs to run in one of two modes: 1. If No command line param is provided the application should run...
15
by: weissborn | last post by:
I'm a php newbie. I have installed apache 2.0.54 and php 5.0.5 on my win2k box. However, it does not appear the php is working properly. I base...
2
by: John M | last post by:
Hi For reporting grades and comments about students, I use one subreport per subject. This includes a number of text boxes, some containing...
4
by: Oenone | last post by:
Could someone who has done it confirm for me that if I install VS2005 final on a computer that already has VS2003 installed, it won't interfere with...
2
by: Nathan Pinno | last post by:
Hi, Can anyone tell me if pygame and Tkinter can work together in the same application? I thought I'd better ask before trying it, since both use...
7
by: shwetu | last post by:
If i place vb and cs class files together in App_Code in asp.net 2.0 i get error that i can't place as they us a different language which is not...
4
by: thursday's geek | last post by:
I am using the Visual Studio 2005 installer on our project, and we just started moving from C++ to C#. So, most of the code is still C++, but there...
1
by: Chris | last post by:
Hi, we run a webapplication where users must log in. So the web.config contains: <authentication mode="Forms"/and IIS is set to Anonymous...
1
by: Cdude | last post by:
How do i make it so that each time i select a different row in my datagradview i want the data in my other to change accordingly.For example, i...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

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.