473,378 Members | 1,312 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.

Using ADO and DAO in same mdb

hi,

I started a project with a company who hired two Access developers
because of the tight timeline. Problem, I use DAO the other developer
uses ADO. I believe we can use both ADO and DAO by putting the DAO
reference first and then the ADO if he fully qualifies all the ADO
declarations. Is this correct?

Any comments appreaciated.

Cheers,
Barry
www.witstoronto.ca

Jul 29 '07 #1
13 2500
Per Barry Edmund Wright:
>I believe we can use both ADO and DAO by putting the DAO
reference first and then the ADO if he fully qualifies all the ADO
declarations. Is this correct?
Dunno, but my experience has been that if I qualify all
references (both DAO and ADO) there's no problem.
--
PeteCresswell
Jul 29 '07 #2
Yes, Access defaults to the first one that appears in the References list.
So Access will default ti DAO. And you are correct that all ADO must be
fully qualified in this case. You should however follow Pete's suggestion
and qualify both DAO code and ADO code.

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
re******@pcdatasheet.com



"Barry Edmund Wright" <bw**************@sympatico.cawrote in message
news:11*********************@i13g2000prf.googlegro ups.com...
hi,

I started a project with a company who hired two Access developers
because of the tight timeline. Problem, I use DAO the other developer
uses ADO. I believe we can use both ADO and DAO by putting the DAO
reference first and then the ADO if he fully qualifies all the ADO
declarations. Is this correct?

Any comments appreaciated.

Cheers,
Barry
www.witstoronto.ca

Jul 29 '07 #3
Thanks for the remarks.

On Jul 29, 11:05 am, "Steve" <So...@private.emailaddresswrote:
Yes, Access defaults to the first one that appears in the References list.
So Access will default ti DAO. And you are correct that all ADO must be
fully qualified in this case. You should however follow Pete's suggestion
and qualify both DAO code and ADO code.

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
resou...@pcdatasheet.com

"Barry Edmund Wright" <bwright_msacc...@sympatico.cawrote in messagenews:11*********************@i13g2000prf.go oglegroups.com...
hi,
I started a project with a company who hired two Access developers
because of the tight timeline. Problem, I use DAO the other developer
uses ADO. I believe we can use both ADO and DAO by putting the DAO
reference first and then the ADO if he fully qualifies all the ADO
declarations. Is this correct?
Any comments appreaciated.
Cheers,
Barry
www.witstoronto.ca- Hide quoted text -

- Show quoted text -

Jul 29 '07 #4
On Jul 29, 10:38 am, Barry Edmund Wright
<bwright_msacc...@sympatico.cawrote:
hi,

I started a project with a company who hired two Access developers
because of the tight timeline. Problem, I use DAO the other developer
uses ADO. I believe we can use both ADO and DAO by putting the DAO
reference first and then the ADO if he fully qualifies all the ADO
declarations. Is this correct?
I'm so happy you said that any comments (would be) appreciated. Here
are mine:

Two developers each using a different technology is going to save
time?

What version of Access is going to be used? Does the ADO developer
bind forms in an MDB to an ADO recordset? Is this fast and simple? How
about reports? Maybe the project will use unbound forms. Oh goodie,
that's another way to speed up development, right? Maybe it will use
unbound reports too? Yes, I've used a few. Oh wait, that was in an
ADP. Regardless, who else has? Hands up! Please, send me a couple as
text objects and I'll publish them for all to see. (Yes, Terry I know
you probably have done this, but I'm being sceptical only of mortals
tonight.)

There are lots of Access developers who know DAO but don't know ADO.
But there's one who knows ADO but not DAO? Did he/she learn on ADPs?
If so then what level of MDB expertise does this person have? Even the
world's greatest fan of ADO (that's me) would use DAO in the situation
you're describing. He/she can't handle both DAO and ADO? You're
kidding! You're working with the mentally handicapped?

Who's going to maintain this monstrosity? It would have to be somebody
whose so unskilled he/she can't get any other work. Surely no on else
would touch it!

This whole idea is just idiocy. The person who hired the two
developers should be fired. And the DAO developer must be starving or
he/she would never get involved in this barrel of alligators. The ADO
developer is probably just really stupid or completely inexperienced.

Jul 30 '07 #5
On Jul 29, 10:38 am, Barry Edmund Wright
<bwright_msacc...@sympatico.cawrote:
hi,

I started a project with a company who hired two Access developers
because of the tight timeline. Problem, I use DAO the other developer
uses ADO. I believe we can use both ADO and DAO by putting the DAO
reference first and then the ADO if he fully qualifies all the ADO
declarations. Is this correct?

Any comments appreaciated.

Cheers,
Barrywww.witstoronto.ca
You might be able to meet your deadline with an ADO/DAO mix, but I'd
say you've still got a huge kettle of worms, er, a different can of
fish, er, more fun than a swamp full of monkeys. You'll definitely be
mixing your metaphors before they're said and done with :-).

James A. Fortune
CD********@FortuneJames.com

If you outsource a project to multiple programmers, when the project's
done it will be obvious that multiple programmers worked on it.

Jul 30 '07 #6
rkc
Barry Edmund Wright wrote:
hi,

I started a project with a company who hired two Access developers
because of the tight timeline. Problem, I use DAO the other developer
uses ADO. I believe we can use both ADO and DAO by putting the DAO
reference first and then the ADO if he fully qualifies all the ADO
declarations. Is this correct?
Put all DAO code between With CurrentDB... End With blocks.

Put all ADO code between With CurrentProject.Connection... End With blocks.

Remove both references and have at it.
Jul 30 '07 #7
Barry Edmund Wright <bw**************@sympatico.cawrote:
>I started a project with a company who hired two Access developers
because of the tight timeline. Problem, I use DAO the other developer
uses ADO. I believe we can use both ADO and DAO by putting the DAO
reference first and then the ADO if he fully qualifies all the ADO
declarations. Is this correct?
Yup, that works.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
Jul 30 '07 #8
We use ADO against jet only for executing sql schema statements and for
a few esoteric things not supported by DAO such as working with streams.
Apart from that, for all other nuts and bolts stuff, DAO is the way to
go. Be aware that schema changes made through an ADO connection in this
way are not always immediately visible in DAO unless you refresh the
collection you're working with.

Barry Edmund Wright wrote:
hi,

I started a project with a company who hired two Access developers
because of the tight timeline. Problem, I use DAO the other developer
uses ADO. I believe we can use both ADO and DAO by putting the DAO
reference first and then the ADO if he fully qualifies all the ADO
declarations. Is this correct?

Any comments appreaciated.

Cheers,
Barry
www.witstoronto.ca
Jul 30 '07 #9
lyle <ly************@gmail.comwrote in
news:11*********************@19g2000hsx.googlegrou ps.com:

[a post, every word of which I found myself nodding my head in
agreement with]

Who are you and what have you done with the real Lyle Fairfield?

;)

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Jul 30 '07 #10
rkc <rk*@rkcny.yabba.dabba.do.comwrote in
news:46**********************@roadrunner.com:
Barry Edmund Wright wrote:
>I started a project with a company who hired two Access
developers because of the tight timeline. Problem, I use DAO the
other developer uses ADO. I believe we can use both ADO and DAO
by putting the DAO reference first and then the ADO if he fully
qualifies all the ADO declarations. Is this correct?

Put all DAO code between With CurrentDB... End With blocks.

Put all ADO code between With CurrentProject.Connection... End
With blocks.

Remove both references and have at it.
*That* is extremely clever.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Jul 30 '07 #11
John Winterbottom <jo*****@rogers.cawrote in
news:5h*************@mid.individual.net:
Be aware that schema changes made through an ADO connection in
this way are not always immediately visible in DAO unless you
refresh the collection you're working with.
If you use a db variable initialized with CurrentDB() *after* the
collection has been updated, you won't need to refresh, as
CurrentDB() refreshes collections before returning its reference
(that's why it's slower than DBEngine(0)(0)).

On the other hand, if you use a db variable that was initialized
with CurrentDB() before updating the collections, you'll need to
refresh the appropriate colection, as John advises.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Jul 30 '07 #12
I like the response above.

There is no need to be worried about using dao and ado at the same
time.

You have to use dao to refresh the linked tables?

One can argue that ado is better, but dao seems to take less lines and
is simpler!

Sometimes you need ado to link to say dbII and SQL whilst most of the
time dao will be okay.

Having two developers is not an issue if they communicate okay plus
use similiar naming conventions.

One note though is be careful of binding forms with code if you can
just use linked tables!
You might as well use asp.net if you don't want to take advantage of
access's data binding.

I've seen nightmare coding with unbound forms when this wasn't
necessary.

Regards,
Tom Bizannes
Microsoft Access Development
Sydney, Australia
http://www.smartbiz.com.au

Jul 31 '07 #13
"SmartbizAustralia" <to*@smartbiz.com.auwrote
One can argue that ado is better, but dao
seems to take less lines and is simpler!
If, indeed, DAO takes less time and is simpler, what would be the argument
for ADO being "better?"
Having two developers is not an issue if
they communicate okay plus use similiar
naming conventions.
Each developer added to a project adds to the overhead for communication,
coordination, and project management. Two developers can complete a task
faster than one, if, as you say, they communicate OK and use similar
conventions, but they can't complete it twice as fast. Each additional
developer added to what is really one task, will increase that overhead, and
soon you will be spending so much time/effort on those items that the task
will take longer than with a single developer.

That applies, to a lesser degree, even to adding developers to work on tasks
that can be done in parallel and are not dependent on each other.

This, of course, does not apply only to programming projects but other types
of projects, as well. It particularly applies to "intellectual" endeavors
such as software development. 50 bulldozers can come much closer to
clearing large acreage 50 times as fast as one... but not _quite_ 50 times
as fast. :-)

Larry Linson
Microsoft Access MVP
Larry Linson
Microsoft Access MVP
Aug 1 '07 #14

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

Similar topics

9
by: Roger Withnell | last post by:
I'm inserting a new record into an MS SQL database table and I want to obtain the new records autonumber immediately afterwards, as follows: MadminRS.CursorLocation = adUseServer...
1
by: Sandie Towers | last post by:
We use a number of similar databases and frequently create a new database using a backup restore of another similar database. We try to keep changes between databases in _Additional tables - like...
9
by: Randy Yates | last post by:
I've seen this creep into c++ and have never heard of it. It apparently has something to do with the standard C++ library header files (e.g., <string>, <fstream>, etc.). Any illunination? -- % ...
121
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode...
17
by: Danny J. Lesandrini | last post by:
The following code works with a standard MDB to navigate to a particluar record (with a DAO recordset, of course) but it's giving me problems in an ADP I'm working on. Dim rs As ADODB.Recordset...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
3
by: John Spiegel | last post by:
Hi All, I've been working on building a .dll in C# (framework 1.1) and using it in VFP8. As always, the example that runs so smoothly in the article fails at a rather basic point in practice. ...
4
by: chimambo | last post by:
I have 2 problems: 1. I want to import a single text file into an access table using a Macro. I am however getting an error that I need to put a specification name argument. What does this mean?...
68
by: Jim Langston | last post by:
I remember there was a thread a while back that was talking about using the return value of a function as a reference where I had thought the reference would become invalidated because it was a...
65
by: Arjen | last post by:
Hi, Form a performance perspective, is it wise to use the ref statement as much as possible? Thanks! Arjen
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: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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.