Click to See Complete Forum and Search --> : Ado and ODBC
defektorx
July 17th, 2000, 06:29 AM
I have an NT server with a datasource called datHelp, it is an access database. The database also resides on the server. What do I tell my connectionstring to attach to the database, I tried using Machine name but I keep getting the datasource not found message. CAn I connect to an access database with an ODBC setup on another server or do I have to have SQL server installed ?
AnneWright
July 17th, 2000, 09:58 AM
Set up a DSN in the ODBC manager to point to your access database, then just reference the dsn name in the connectionstring. i.e connectionstring="DSN=ACCESS;UID=ADMIN"
Regards
Anne Wright
Wright Computing
Askia Boly
July 18th, 2000, 01:31 AM
Youi may connect to your Data source (DSN) in two ways.
1) you could use the ServerMapPath("YourDatabase.mdb"). this is a slowest way but it works fine for testing.
2) you might use the DNSLess way by providing the following structure:
Create first an instance of the connection object like this
" Set Con = Server.CreateObject("ADODB.Connection") " then use the Con object to open a DSN like this:
Con.Open("DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\InetPub\wwwroot\thePath\YourDatabase.mdb") where c:\InetPub\wwwroot\thePath\YourDatabase.mdb is the absolute path of your Database file.
Good luck.
Askia.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.