|
 |
asp_database_setup thread: ODBC
Message #1 by "Charles McLagan" <charles@c...> on Mon, 6 Aug 2001 17:36:57
|
|
I developed and ASP site with an access database on Win 98 & IIS 4, but
now I have upgraded to Win 2000, I get:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager] Data source name not found and no default
driver specified
Yet I have specified the driver in ODBC - any ideas??????????
Message #2 by "Ken Schaefer" <ken@a...> on Tue, 7 Aug 2001 17:32:37 +1000
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Charles McLagan" <charles@c...>
Subject: [asp_database_setup] ODBC
: I developed and ASP site with an access database on
: Win 98 & IIS 4, but now I have upgraded to Win 2000, I get:
:
: Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
: [Microsoft][ODBC Driver Manager] Data source name not found
: and no default driver specified
:
: Yet I have specified the driver in ODBC - any ideas??????????
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Can you provide the code you are using?
Cheers
Ken
Message #3 by "Charles McLagan" <charles@c...> on Tue, 7 Aug 2001 11:05:27
|
|
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> From: "Charles McLagan" <charles@c...>
> Subject: [asp_database_setup] ODBC
>
>
> : I developed and ASP site with an access database on
> : Win 98 & IIS 4, but now I have upgraded to Win 2000, I get:
> :
> : Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
> : [Microsoft][ODBC Driver Manager] Data source name not found
> : and no default driver specified
> :
> : Yet I have specified the driver in ODBC - any ideas??????????
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Can you provide the code you are using?
>
> Cheers
> Ken
>
The connection code is :
Dim objConn, objrs, strQuery
Dim strConnection
Set objConn = Server.CreateObject("ADODB.Connection")
strConnection = "DSN=cgp;Database=cgp;"
strConnection = strConnection & "UID=sa;PWD=;"
objConn.Open strConnection
Message #4 by "Ken Schaefer" <ken@a...> on Tue, 7 Aug 2001 22:56:38 +1000
|
|
Hi,
When you create the DSN, you specify all the necessary parameters, including
the "database=" (you don't need that for an Access database), so your
objConn.Open line shoudl read:
objConn.Open "DSN=DSNNameHere"
optionally you can provide a User ID and Password, if you want to override
what you specified in the DSN.
That said, you might want to read this:
http://www.adopenstatic.com/faq/whyOLEDB.asp
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
----- Original Message -----
From: "Charles McLagan" <charles@c...>
To: "ASP Database Setup" <asp_database_setup@p...>
Sent: Tuesday, August 07, 2001 11:05 AM
Subject: [asp_database_setup] Re: ODBC
: > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: > From: "Charles McLagan" <charles@c...>
: > Subject: [asp_database_setup] ODBC
: >
: >
: > : I developed and ASP site with an access database on
: > : Win 98 & IIS 4, but now I have upgraded to Win 2000, I get:
: > :
: > : Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
: > : [Microsoft][ODBC Driver Manager] Data source name not found
: > : and no default driver specified
: > :
: > : Yet I have specified the driver in ODBC - any ideas??????????
: > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: >
: > Can you provide the code you are using?
: >
: > Cheers
: > Ken
: >
:
: The connection code is :
:
: Dim objConn, objrs, strQuery
: Dim strConnection
: Set objConn = Server.CreateObject("ADODB.Connection")
: strConnection = "DSN=cgp;Database=cgp;"
: strConnection = strConnection & "UID=sa;PWD=;"
: objConn.Open strConnection
: ---
: Search the best ASP Web sites using CodeHound! http://www.codehound.com
: Now it's easy to find ASP source code on the Internet. CodeHound's free
: search engine will categorize your results and even search for ASP code
: compressed in Zip files on the Internet. Stop searching dozens of
: different sites to find what you want...try CodeHound right now!
ken@a...
$subst('Email.Unsub')
|
|
 |