Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

equivalent DAO connect in ADO

196 views
Skip to first unread message

GeorgeMar

unread,
May 18, 2010, 3:51:01 AM5/18/10
to
I am updating an application from 2003 to 2007 and it currently uses
ODBCDirect. Since ODBCDirect is no longer supported in 2007, I am converting
the DSN connection to ADO.

Currently, the module uses the DAO CreateWorkspace and it get the connection
details from the "connect" property. e.g strDSNdetails=cnn.connect.

Is there an equivalent "connect" property for ADO. It is essential for the
application that to get the same details of DSN connection be obtained it got
before or very close to it.

many thanks
george

David W. Fenton

unread,
May 18, 2010, 3:42:22 PM5/18/10
to
=?Utf-8?B?R2VvcmdlTWFy?= <Geor...@discussions.microsoft.com> wrote
in news:BA4FD0CD-49CC-4C64...@microsoft.com:

> I am updating an application from 2003 to 2007 and it currently
> uses ODBCDirect. Since ODBCDirect is no longer supported in 2007,
> I am converting the DSN connection to ADO.

ADO is dead. Microsoft is recommending ODBC and DAO for future
development, and has been doing so for about 5 years now.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/

GeorgeMar

unread,
May 18, 2010, 4:53:01 PM5/18/10
to
I thought it was the other way around


"David W. Fenton" wrote:

> .
>

Douglas J. Steele

unread,
May 19, 2010, 7:01:11 AM5/19/10
to
"GeorgeMar" <Geor...@discussions.microsoft.com> wrote in message
news:D75C8498-0613-4AA4...@microsoft.com...

>
>> > I am updating an application from 2003 to 2007 and it currently
>> > uses ODBCDirect. Since ODBCDirect is no longer supported in 2007,
>> > I am converting the DSN connection to ADO.
>>
>> ADO is dead. Microsoft is recommending ODBC and DAO for future
>> development, and has been doing so for about 5 years now.
>
>I thought it was the other way around


Nope, David's absolutely correct (as usual)

--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)


David W. Fenton

unread,
May 19, 2010, 4:55:12 PM5/19/10
to
"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_gmail.com> wrote in
news:el7RZK09...@TK2MSFTNGP06.phx.gbl:

> "GeorgeMar" <Geor...@discussions.microsoft.com> wrote in message
> news:D75C8498-0613-4AA4...@microsoft.com...
>>
>>> > I am updating an application from 2003 to 2007 and it
>>> > currently uses ODBCDirect. Since ODBCDirect is no longer
>>> > supported in 2007, I am converting the DSN connection to ADO.
>>>
>>> ADO is dead. Microsoft is recommending ODBC and DAO for future
>>> development, and has been doing so for about 5 years now.
>>
>>I thought it was the other way around
>
> Nope, David's absolutely correct (as usual)

Well, I'm usually not absolute (though I'll occasionally go for
Absolut, of course).

On topic, the DAO-is-dead/Jet-is-dead meme is nearly 10 years out of
date. The release of A2007 should have shown that to anyone who was
not already paying attention.

GeorgeMar

unread,
May 19, 2010, 6:53:01 PM5/19/10
to
Thanks for the advice.

However, in may 2010, when converting a 2K application to 2007, where
CreateWorkspace is used, it fails with the error "error 3847: ODBCDirect is
no longer supported. Rewrite the code to use ADO instead of DAO"

In any case, any ideas on how to redo this code:

Set wrk = CreateWorkspace("NewODBCWrk", "admin", "", dbUseODBC)
Set conn = wrk.OpenConnection("NewODBCConnection", dbDriverNoPrompt, True,
strPath)

'Now get the full connection string returned from the connect property.
strPath = conn.Connect


many thanks

George


"David W. Fenton" wrote:

> .
>

David W. Fenton

unread,
May 20, 2010, 6:58:09 PM5/20/10
to
=?Utf-8?B?R2VvcmdlTWFy?= <Geor...@discussions.microsoft.com> wrote
in news:0407226C-6FBC-4ABD...@microsoft.com:

> However, in may 2010, when converting a 2K application to 2007,
> where CreateWorkspace is used, it fails with the error "error
> 3847: ODBCDirect is no longer supported. Rewrite the code to use
> ADO instead of DAO"
>
> In any case, any ideas on how to redo this code:
>
> Set wrk = CreateWorkspace("NewODBCWrk", "admin", "", dbUseODBC)
> Set conn = wrk.OpenConnection("NewODBCConnection",
> dbDriverNoPrompt, True, strPath)
>
> 'Now get the full connection string returned from the connect
> property. strPath = conn.Connect

I don't know the answer to your question, but I do know I wouldn't
use ADO at all. I'd convert to DAO.

I know that ADO is *supposed* to provide an improvement over ODBC
and solve many of the problems Jet had interacting with ODBC and
ODBCDirect, but ADO is too smart in too many cases, and doesn't
really work as well as MS would have liked us to believe.

Why do you think you need ODBCDirect?

0 new messages