Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

[Access2003, VBA] Use DAO or ADO?

 
Goto page Previous  1, 2
   Database Forums (Home) -> MS Access RSS
Next:  Deleting Large Numbers of Rows w/o Filling up my ..  
Author Message
aaron.kempf

External


Since: May 26, 2005
Posts: 31



(Msg. 16) Posted: Sat Dec 27, 2008 9:04 am
Post subject: Re: Use DAO or ADO? [Login to view extended thread Info.]
Archived from groups: comp>databases>ms-access (more info?)

Larry

SQL Server is more popular than Jet.

Stop living in a cave, old man.

-Aaron


On Dec 26, 1:52 pm, "Larry Linson" wrote:
> One of the reasons my clients preferredAccess/ Jet / ODBC was that they
> did not have to search out developers who knew specific back-end server
> language dialects. Those were harder to locate and more expensive to
> hire/contract; competentAccessdevelopers were in greater supply and were
> less expensive.  Those clients _instructed_ the prime contractors to avoid
> passthrough queries unless there was a compelling need; the common
> compelling need we found was a Stored Procedure to calculate the next key
> for each given table.  Those keys were not subject to being "lost" like
> Autonumber or its server equivalent and could have been shown to the users
> (though we did not do so... for business and business logic reasons, we used
> them similarly to how Autonumber is used).
>
> OLEdb seems obviously to be a dying technology... classic ADO may be around
> in the Office world, and a few other software packages, but in "Microsoft's
> real world of development, Dot Net", ADO has been superceded by ADO.NET
> which is not OLEdb-based, and uses a different Object Model.
>
> I agree, David, that the claimed "advantages" of ADO are most often simply
> workarounds to avoid problems created by selecting ADO in circumstances
> where it made no sense in the first place, except that someone thought
> (wrongly) that it was to be the "wave of the future" inMicrosoft
> development. Instead, it was just another ofMicrosoft'sattempts at
> three-letter-acronym data handling techniques that lasted no, or little,
> longer than any of the others.
>
>  Larry Linson
>  MicrosoftOfficeAccessMVP
>
> "David W. Fenton" wrote in messagenews:Xns9B7EAC2D9756f99a49ed1d0c49c5bbb2@74.209.136.88...
>
>
>
> > "Albert D. Kallal" wrote in
> >
>
> >> "David W. Fenton" wrote in message
>
> >>>> You can use CurrentProject.Connection when you have linked
> >>>> tables to a jet backend to open a ado recordset.
>
> >>> Why would you want to do so?
>
> >> Because one might have chosen to use ado in place dao in their
> >> application.
>
> > Why would you have done that?
>
> >> So, I am saying *if* one makes the choice to use ado,
>
> > ...which I'm saying is a mistake in any app with linked tables...
>
> >> you do NOT have to
> >> build a connection string to the back end JET share
>
> > ...which you'd never have to do if you used linked tables...
>
> >> nor do you have to use a
> >> jet odbc connection to the back end.
>
> > ...which you'd never have to do with linked tables...
>
> >> There is a built-in connection object
> >> created for you (it likely pulls the connection string out of the
> >> linked table..but it not using odbc).
>
> > ...which you'd never need if you're using linked tables.
>
> >> So, that means you can go in your code with ado:
>
> >> Dim rs As New ADODB.Recordset
>
> >> rs.Open ("select * from contacts"), CurrentProject.Connection
> >> Do While rs.EOF = False
> >>    Debug.Print rs!FirstName
> >>    rs.MoveNext
> >> Loop
> >> rs.Close
> >> Set rs = Nothing
>
> > Who cares? If you're using linked tables, you don't have to do it
> > that way at all. You can use DAO on the CurrentDB and be done with
> > it, never having to worry one bit about connection strings for your
> > back end.
>
> > This is the point of linked tables.
>
> > Not using them unnecessarily complicates an application without
> > offering any signficant benefit.
>
> >> Perhaps you are not clear or even aware that when using linked
> >> tables to a jet file share you do have a built in ADO connection
> >> object.
>
> > If you're using ADO. But why would you use ADO with linked tables?
>
> >> So, again my
> >> point was **IF** you going to use a ado recordsets, you don't have
> >> create or build your connection string to the jet back end.
>
> > But *why* would you use ADO if you're using linked tables?
>
> >> So, in the above I not setting up a odbc connection to that jet
> >> back end..am I???
>
> > I don't know and I really don't care. You're giving an academic
> > example of what ADO makes easier if you choose the wrong tools.
> > That's nice that ADO makes it really easy to get around the mistake
> > of choosing ADO as your interface, but, well, I'm questioning the
> > initial choice of ADO when you have linked tables -- DAO makes
> > *much* more sense.
>
> > And eliminates the problem you say ADO "solves."
>
> >>>> While there is some advantages when using ADO with sql server,
> >>>> oracle (at least ones that provide a oleDB connection) there
> >>>> also a good case to choose ADO if you plan to upgrade to sql
> >>>> server in the future.
>
> >>> Why? If you're using ODBC, you gain exactly nothing.
>
> >> You gain sql neutral code. eg:
>
> >> dao:
> >> select * from tclCustomers where city like 'new*'
> >> The above is jet/dao syntax, but if you use an ado reocrdset, you
> >> can go:
>
> >> ado:
> >> select * from tclCustomers where city like 'new%'
>
> > Why does this matter? Every ODBC driver usable by Jet will translate
> > Jet's syntax into the relevant syntax for the back end in use. Why
> > would anyone *care* about having "neutral" SQL in yourAccessfront
> > end?
>
> >> Both the above are hitting a jet back end. However, the 2nd syntax
> >> will ALSO work for mysql, oracle and sql server if I take that sql
> >> and want to run it server side.
>
> > Via ODBC linked tables, the first will also work with MySQL, Oracle
> > and SQL Server.
>
> >> And, if simply want to change the reocrset to pass-though, then
> >> again I do NOT have to change the sql syntax. (in fact, if I do
> >> setup a oleDB connection string, then I get 100% by-pass of jet,
>
> > I'm not sure this is correct, but can't prove that it's not.
>
> > But why anyone would want to throw away all the enormous capability
> > of Jet, I don't know. So far as I can tell, it's only ignorant
> > people with an irrational fear of an incredibly versatile database
> > engine that they don't understand who want to avoid Jet at all
> > costs.
>
> >> and I not have to
> >> change the sql one bit. If you code to dao, you WILL have to
> >> change your syntax to work with sql,mysql etc. if you want to
> >> avoidperformancebottle necks.
>
> > And if you're using linked tables, none of this is important.
>
> >> Note that it is not that oleDB is faster then odbc, it
> >> is the fact that you are by-passing jet (that DOES make a big
> >> difference inperformance). So, while it most a myth that oleDB is
> >> faster then odbc, a pass-though that by-passes jet (via oleDB, or
> >> jet odbc) is MUCH faster then going though jet. Again, MUCH
> >> faster!
>
> > I'd like to see some evidence for this claim. I don't believe it's
> > true. If it were, MS wouldn't be saying that MDB/ODBC is better than
> > ADP/OLEDB. Remember, they explain that the data shaping layer with
> > ADP/OLEDB causes significant bottleneck. And that layer is there
> > with ADO used from an MDB, too.
>
> > So, your claim ofperformancebenefits seems to me to be at odds
> > with MS's own recommendations.
>
> >> Hence, with ado, you wind up using ONE sql syntax, and a NOT
> >> mix/mash in your reocrdset code when you hitting the server.
>
> > With linked tables you end up using one SQL syntax and it works
> > automatically with all back ends. You don't *need* to know what the
> > back end SQL dialect is.
>
> >> This simply makes (forces) your sql statements to be MORE database
> >> engine neural.
>
> > And this is good because...?
>
> >> So, that is why ado is a BETTER choice then dao if you plan to be
> >> working with different data engines.
>
> > I think this is all so much bullshit. The point of ODBC and linked
> > tables is that they make the specifics of the back end database
> > engine irrelevant.
>
> >>>> So, ADO is a better abstraction and it is more data engine
> >>>> neutral then DAO.
>
> >>> I think that's pure bullshit. If you're using linked tables, then
> >>> Jet is involved, and it's just bloody silly to use ADO to work
> >>> with Jet, even if the back end is something other than Jet. If
> >>> you're using ODBC, then you're not communicating directly with
> >>> the back end tables.
>
> >> Well, if you change your connection string from JET to sql server,
> >> you ARE now communication directly with the server side..and you
> >> NOT have changed your sql syntax. This will be far less work to
> >> use that sql if you choose ado as your recordset model.
>
> > If you're using linked tables, you don't have to make any changes to
> > the SQL syntax when switching from Jet to SQL Server linked tables.
>
> > I don't know what you're nattering on about. Every example you
> > provide seems to ignore reality, claiming for ADO exactly the same
> > benefits you get with linked tables and DAO.
>
> >>>> ADO does tend to
> >>>> force you to be somewhat more data engine neural when you write
> >>>> your sql statements.
>
> >>> I think that is, once again, completely BS.
>
> >> Well, I guess we see this differently.  ADO is MORE vendor/data
> >> engine natural then dao is. That is not conjecture, that is just
> >> the way it is.
>
> > Give me an example of where you have to write SQL for linked tables
> > differently for different database engines?
>
> >> ADO is NOT the data engine where as dao is pretty much the jet
> >> engine object model.
>
> > And Jet can communicate via ODBC and various ISAMs with a whole host
> > of database engines. And it's remarkably smart in doing so, taking
> > away much of the complexity involved, and presenting all data
> > sources as similar.
>
> >> ADO represents an abstraction on top of whatever you are using, be
> >> it jet,oracle, MySql, sql server etc.
>
> >> I don't see really any reason to use ADO foraccessapplications,
> >> but there are cases when server side stuff is involved.
>
> > And if you're using linked tables, there's no reason to use ADO.
>
> > Which is what I've been saying repeatedly.
>
> >> When we had vb6 developers coming intoaccessdevelopment, they
> >> often used ado because that's what they had been using.
>
> > Yes, because they are ignorant of the benefits of linked tables in
> >Access, which they've never encountered before.
>
> >> However, now that ado is on it
>
> ...
>
> read more »- Hide quoted text -
>
> - Show quoted text -

 >> Stay informed about: [Access2003, VBA] Use DAO or ADO? 
Back to top
Login to vote
aaron.kempf

External


Since: May 26, 2005
Posts: 31



(Msg. 17) Posted: Sat Dec 27, 2008 9:05 am
Post subject: Re: Use DAO or ADO? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

thanks Lyle-- I applaud your passion
thanks Lyle-- I applaud your passion
thanks Lyle-- I applaud your passion




On Dec 27, 6:12 am, lyle fairfield wrote:
> On Dec 26, 10:22 pm, "David W. Fenton"
> wrote:
>
> > Classic ADO is a dead technology that noAccessdeveloper who is not
> > developing ADPs should spend even one minute with.
>
> If ADO is a dead technology and MS has returned to ODBC links as its
> preferred way of interfacing with Server-hosted data, then why, inAccess2007, does this code
>
> Dim myWorkSpace As DAO.Workspace
> Set myWorkSpace = DBEngine.CreateWorkspace("", "", "", dbUseODBC)
>
> elicit this (error) response:
>
> MicrosoftVisual Basic
>
> Run Time Error ‘3847’
>
> "ODBCDirect is no longer supported.
> Rewrite the code to use ADO instead of DAO."
>
> ?

 >> Stay informed about: [Access2003, VBA] Use DAO or ADO? 
Back to top
Login to vote
David W. Fenton

External


Since: Sep 29, 2007
Posts: 203



(Msg. 18) Posted: Sat Dec 27, 2008 7:28 pm
Post subject: Re: [Access2003, VBA] Use DAO or ADO? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Emil" wrote in

> I'm VBA-programmer and quite new to data accessing libraries. As I
> read, DAO is older, but stable. ADO is modern, but candidate to be
> taken over by ADO.NET. Which of the libraries DAO and ADO would
> you recommend to take a closer look at? Which librarie/framework
> is used by Access2007?

DAO. Without question. ADO is dead and has no role in any Access
application using linked tables.

That isn't to say that you might not be occasionally forced to use
ADO (because of the stupid decisions MS made back in 1999 or so
about what things to put in ADO vs. DAO when they upgraded Jet to
Jet 4), but ADO should be something you use exceptionally, only when
forced to do so.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
 >> Stay informed about: [Access2003, VBA] Use DAO or ADO? 
Back to top
Login to vote
Tony Toews [MVP]

External


Since: Aug 06, 2007
Posts: 399



(Msg. 19) Posted: Sat Dec 27, 2008 8:25 pm
Post subject: Re: Use DAO or ADO? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

SmartbizAustralia wrote:

>You couldn't have picked a more contentious subject.

Except natural vs surrogate keys. <smile>

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/
 >> Stay informed about: [Access2003, VBA] Use DAO or ADO? 
Back to top
Login to vote
Larry Linson5

External


Since: Jun 24, 2004
Posts: 164



(Msg. 20) Posted: Sun Dec 28, 2008 11:25 pm
Post subject: Re: Use DAO or ADO? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"lyle fairfield" wrote

> If ADO is a dead technology

"Dead technology" can be interpreted in several ways. I certainly see that
in what Microsoft calls "the real world of development" (Dot Net) classic
ADO has been superceded by ADO.NET, which is based on different technology
and has a different object model.

> and MS has returned
> to ODBC links as its preferred way of interfacing
> with Server-hosted data, then why, in Access 2007,
> does this code

> Dim myWorkSpace As DAO.Workspace
> Set myWorkSpace = DBEngine.CreateWorkspace("", "", "", dbUseODBC)

> elicit this (error) response:

> Microsoft Visual Basic

> Run Time Error ‘3847’

> "ODBCDirect is no longer supported.
> Rewrite the code to use ADO instead of DAO."?

Because changing the text of error messages was not the highest priority
item in the development of Access 2009?

Larry Linson
Microsoft Office Access MVP
 >> Stay informed about: [Access2003, VBA] Use DAO or ADO? 
Back to top
Login to vote
Larry Linson5

External


Since: Jun 24, 2004
Posts: 164



(Msg. 21) Posted: Sun Dec 28, 2008 11:25 pm
Post subject: Re: Use DAO or ADO? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

wrote

> SQL Server is more popular than Jet.

Your data, or your perception of the data, is in error, or you have been
taken in by "marketing material". Jet 4.0 has been included with the
Windows Operating System for a long time... so long that they no longer had
to include it in the MDAC post-version-2.5 (as you posted that you had
discovered). The same is not true for SQL Server.

Jet remains the most-used database engine in the world. ACE will, I suspect,
soon be giving it competition as new releases of the Windows Operating
System occur.

Larry Linson
Microsoft Office Access MVP
 >> Stay informed about: [Access2003, VBA] Use DAO or ADO? 
Back to top
Login to vote
Larry Linson5

External


Since: Jun 24, 2004
Posts: 164



(Msg. 22) Posted: Sun Dec 28, 2008 11:25 pm
Post subject: Re: [Access2003, VBA] Use DAO or ADO? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"lyle fairfield" wrote

> Example?

As surrogate keys, for joins; not for identifying particular items/records
to a user.

Larry Linson
Microsoft Office Access MVP
 >> Stay informed about: [Access2003, VBA] Use DAO or ADO? 
Back to top
Login to vote
lyle fairfield

External


Since: May 11, 2008
Posts: 296



(Msg. 23) Posted: Mon Dec 29, 2008 7:25 pm
Post subject: Re: Use DAO or ADO? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Dec 29, 8:24 pm, "David W. Fenton"
wrote:
> lyle fairfield wrote innews:666e469d-c7eb-4c5c-a916-a11d73e01561@r34g2000vbp.googlegroups.co
> m:
>
> > On Dec 26, 10:22 pm, "David W. Fenton"
> > wrote:
>
> >> Classic ADO is a dead technology that no Access developer who is
> >> not developing ADPs should spend even one minute with.
>
> > If ADO is a dead technology and MS has returned to ODBC links as
> > its preferred way of interfacing with Server-hosted data, then
> > why, in Access 2007, does this code
>
> > Dim myWorkSpace As DAO.Workspace
> > Set myWorkSpace = DBEngine.CreateWorkspace("", "", "", dbUseODBC)
>
> > elicit this (error) response:
>
> > Microsoft Visual Basic
>
> > Run Time Error ‘3847’
>
> > "ODBCDirect is no longer supported.
> > Rewrite the code to use ADO instead of DAO."
>
> Because there is still code hanging around from the bad old "ADO
> EVERYWHERE" days, just as a lot of online documentation still has
> ADO-only examples.
>
> It takes a long time to correct a major mistake like this. That's
> one of the reasons they should have had more sense and avoided
> making that mistake in the first place.
>
> --
> David W. Fenton                  http://www.dfenton.com/
> usenet at dfenton dot com    http://www.dfenton.com/DFA/

What I reported isn't old; it's new. That is, DirectODBC was supported
until Access 2007. So this is not 'code hanging around from the bad
old "ADO
EVERYWHERE" days'.

Regardless, to make the !!!!!dynamic!!!!! [not a persistent link]
connection to the ODBC source, say SQL Server, (which is what, TTBOMK,
DirectODBC was used for) what should one use? Not ADO? (bad old code).
Not DirectODBC? (no longer supported). So what?

BTW I posted a kludge a few weeks ago.
 >> Stay informed about: [Access2003, VBA] Use DAO or ADO? 
Back to top
Login to vote
David W. Fenton

External


Since: Sep 29, 2007
Posts: 203



(Msg. 24) Posted: Mon Dec 29, 2008 9:25 pm
Post subject: Re: Use DAO or ADO? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

lyle fairfield wrote in

m:

> On Dec 26, 10:22 pm, "David W. Fenton"
> wrote:
>
>> Classic ADO is a dead technology that no Access developer who is
>> not developing ADPs should spend even one minute with.
>
> If ADO is a dead technology and MS has returned to ODBC links as
> its preferred way of interfacing with Server-hosted data, then
> why, in Access 2007, does this code
>
> Dim myWorkSpace As DAO.Workspace
> Set myWorkSpace = DBEngine.CreateWorkspace("", "", "", dbUseODBC)
>
> elicit this (error) response:
>
> Microsoft Visual Basic
>
> Run Time Error ‘3847’
>
> "ODBCDirect is no longer supported.
> Rewrite the code to use ADO instead of DAO."

Because there is still code hanging around from the bad old "ADO
EVERYWHERE" days, just as a lot of online documentation still has
ADO-only examples.

It takes a long time to correct a major mistake like this. That's
one of the reasons they should have had more sense and avoided
making that mistake in the first place.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
 >> Stay informed about: [Access2003, VBA] Use DAO or ADO? 
Back to top
Login to vote
lyle fairfield

External


Since: May 11, 2008
Posts: 296



(Msg. 25) Posted: Tue Dec 30, 2008 6:25 am
Post subject: Re: Use DAO or ADO? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Dec 28, 10:35 pm, "Larry Linson" wrote:
> "lyle fairfield" wrote
>
>  > If ADO is a dead technology
>
> "Dead technology" can be interpreted in several ways.  I certainly see that
> in what Microsoft calls "the real world of development" (Dot Net) classic
> ADO has been superceded by ADO.NET, which is based on different technology
> and has a different object model.
>
>  > and MS has returned
>  > to ODBC links as its preferred way of interfacing
>  > with Server-hosted data, then why, in Access 2007,
>  > does this code
>
>  > Dim myWorkSpace As DAO.Workspace
>  > Set myWorkSpace = DBEngine.CreateWorkspace("", "", "", dbUseODBC)
>
>  > elicit this (error) response:
>
>  > Microsoft Visual Basic
>
>  > Run Time Error ‘3847’
>
>  > "ODBCDirect is no longer supported.
>  > Rewrite the code to use ADO instead of DAO."?
>
> Because changing the text of error messages was not the highest priority
> item in the development of Access 2009?
>
>     Larry Linson
>     Microsoft Office Access MVP

They couldn't change it because it didn't exist. They introduced it.
There was no such error message prior to access 2007 because
ODBCDirect was still supported. This is a new message.

If one will not use ADO as MS recommends what does one use in place of
ODBCDirect?
 >> Stay informed about: [Access2003, VBA] Use DAO or ADO? 
Back to top
Login to vote
lyle fairfield

External


Since: May 11, 2008
Posts: 296



(Msg. 26) Posted: Tue Dec 30, 2008 7:24 am
Post subject: Re: Use DAO or ADO? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Dec 30, 9:48 am, Rick Brandt wrote:
> On Tue, 30 Dec 2008 06:25:56 -0800, lyle fairfield wrote:
> > If one will not use ADO as MS recommends what does one use in place of
> > ODBCDirect?
>
> Under what circumstances does one need to use ODBCDirect?
>
> --
> Rick Brandt, Microsoft Access MVP
> Email (as appropriate) to...
> RBrandt   at   Hunter   dot   com

I have used ODBCDirect to provide a dynamic connection to a data
source. ODBCDirect is outlined at http://msdn.microsoft.com/en-us/library/aa199500(office.10).aspx.
But what it's used for is not the point of my post.
It used to work.
Now (2007) it is not-supported.
And the new message says, "Use ADO."
 >> Stay informed about: [Access2003, VBA] Use DAO or ADO? 
Back to top
Login to vote
lyle fairfield

External


Since: May 11, 2008
Posts: 296



(Msg. 27) Posted: Tue Dec 30, 2008 9:34 am
Post subject: Re: Use DAO or ADO? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Dec 30, 9:48 am, Rick Brandt wrote:
> On Tue, 30 Dec 2008 06:25:56 -0800, lyle fairfield wrote:
> > If one will not use ADO as MS recommends what does one use in place of
> > ODBCDirect?
>
> Under what circumstances does one need to use ODBCDirect?
>
> --
> Rick Brandt, Microsoft Access MVP
> Email (as appropriate) to...
> RBrandt   at   Hunter   dot   com

This function gets information from an sql server database. It's not
necessary to be linked to the sql server database. The connection is
entirely dynamic. The information could be anything from the sql
database, icluding data, of course.
The function could be used in an mdb which used JET Tables, or was
linked to Oracle. It works in Access 2000-2003. It does not work in
2007. ADO is offered as an alternative.

Public Function GetFullyQualifiedNames$(ByVal ServerName$, ByVal
DatabaseName$)
Dim DAOConnection As DAO.Connection
Dim DAOField As DAO.Field
Dim DAORecordset As DAO.Recordset
Dim DAOWorkSpace As DAO.Workspace
Set DAOWorkSpace = DBEngine.CreateWorkspace("", "", "", dbUseODBC)
With DAOWorkSpace
Set DAOConnection = .OpenConnection("", _
dbDriverComplete, _
True, _
"ODBC;Driver={SQL Server};Server=" & ServerName _
& ";Database=" & DatabaseName)
With DAOConnection
Set DAORecordset = .OpenRecordset("SELECT SO.[Name] AS
TableName " _
& ", SS.[Name] AS SchemaName " _
& "FROM Sys.Objects AS SO " _
& "INNER JOIN Sys.Schemas AS SS ON SO.[Schema_ID] = SS.
[Schema_ID] " _
& "WHERE SO.[Type] = 'U' " _
& "ORDER BY SO.[Name]")
End With
End With
With DAORecordset
While Not .EOF
GetFullyQualifiedNames = GetFullyQualifiedNames _
& "[" & ServerName & "]." _
& "[" & DatabaseName & "]." _
& "[" & .Collect("SchemaName") & "]." _
& "[" & .Collect("TableName") & "]" _
& vbNewLine
.MoveNext
Wend
End With
End Function

Sub Test()
Debug.Print GetFullyQualifiedNames("FFDBA-Laptop\SonyLaptop",
"DB_51315")
End Sub
 >> Stay informed about: [Access2003, VBA] Use DAO or ADO? 
Back to top
Login to vote
Rick Brandt

External


Since: Nov 23, 2008
Posts: 36



(Msg. 28) Posted: Tue Dec 30, 2008 10:25 am
Post subject: Re: Use DAO or ADO? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Tue, 30 Dec 2008 06:25:56 -0800, lyle fairfield wrote:
> If one will not use ADO as MS recommends what does one use in place of
> ODBCDirect?

Under what circumstances does one need to use ODBCDirect?

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
 >> Stay informed about: [Access2003, VBA] Use DAO or ADO? 
Back to top
Login to vote
Rick Brandt

External


Since: Nov 23, 2008
Posts: 36



(Msg. 29) Posted: Tue Dec 30, 2008 11:25 pm
Post subject: Re: Use DAO or ADO? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Tue, 30 Dec 2008 09:34:37 -0800, lyle fairfield wrote:
> On Dec 30, 9:48 am, Rick Brandt wrote:
>> On Tue, 30 Dec 2008 06:25:56 -0800, lyle fairfield wrote:
>> > If one will not use ADO as MS recommends what does one use in place
>> > of ODBCDirect?
>>
>> Under what circumstances does one need to use ODBCDirect?
>
> This function gets information from an sql server database. It's not
> necessary to be linked to the sql server database. The connection is
> entirely dynamic. The information could be anything from the sql
> database, icluding data, of course.

I suppose that would be useful if I ever find myself wanting data from a
server that I am not linked to. Hasn't come up yet though. The only
circumstances similar to that is when I get data over the internet, but
in those cases I communicate with a web service middle tier as we don't
expose our data server ports directly to the internet. On a LAN I can't
see any circumstance where I wouldn't be linked or using a passthrough.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
 >> Stay informed about: [Access2003, VBA] Use DAO or ADO? 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Scolling a text box in Access2003 - im using Access2003 and have a text box on a form. the text box is data locked and not enabled. i use some vb code to write status's into the text box. the text box is 10 lines high. my code writes lines 1 and 2 then waits for 2 secs. writes line 3 ..

Access2003 + CDO + TO: (how do I pull TO: list from table) - Hi All ~ First time posting. I have a module that works ... it contains: Set objCDOMessage = CreateObject("CDO.Message") With objCDOMessage Set .Configuration = objCDOConfig .From = "PSS Mass Mail Mailbox" ...

can't open ACCESS2003 database due to error 3197 - Online help sez I need to update database security. How can I do that if the ACCESS2003 database won't open due to error 3197 ( MS Jet engine stopped due to you and another user trying to access...) There is only one use of database.

counting records - Hi, table name: tblEmployees Query : qryNationality Form: frmNationaliy the query has two fields EmployeeID and CountryRegion fields. When I open the form frmNationality have a text Box Text4 in whcih I want to appear the number...

Corruption - I have a fairly simple database which is used to archive records for people enrolled on some courses. The database holds details of the courses, learners details and enrollments (along with a few other small things). The database is updated daily wit...
   Database Forums (Home) -> MS Access All times are: Pacific Time (US & Canada)
Goto page Previous  1, 2
Page 2 of 2

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]