I’ve got a few pages that connect to a database. This is nothing new to me I’ve got hundreds of pages connecting to databases on other servers. However, for some reason this one server won’t except a DSN connection. I have to use a DSNless connection to get it to connect. The server that won’t use a DSN connection is running Windows 2000 Server. I have pages connecting to databases on these OS’s; Windows XP Media Center, Windows XP Professional, and Windows 2003 Server. Do you have to do something different on a Windows 2000 machine or is there something else wrong that I might not be thinking about?
DSN Connection Code:
[CODE]
Set connDB = Server.CreateObject(“ADODB.Connection”)
connDB.ConnectionString = “DSN=DB.dsn”
connDB.Open
DSNless Connection Code:
[CODE]
Set connDB = Server.CreateObject(“ADODB.Connection”)
connDB.Open “DBQ=” & Server.MapPath(“../Path/DB.mdb”) & “;Driver={Microsoft Access Driver (*.mdb)};DriverId=25;MaxBufferSize=8192;Threads=20;”, “username”, “password”
Thanks!