Reputation: 25731
I have an old website that someone else built like 20 years ago but we changed servers and broke the connection string.
The page I found was such:
<%
dim Conn
Dim ipConn
dim connstr
Dim ipconnstr
connstr ="DSN=ADASv5"
Sub openConnection()
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open connstr
End Sub
Sub closeConnection()
Conn.close
set Conn = Nothing
End Sub
%>
Is the server name stored in IIS somewhere? I don't have access to IES and have to go through a third party.
Upvotes: 0
Views: 345
Reputation: 4663
Data Source Names are created in ODBC manager, which you will find in Control Panel. If the DSN was on your old server then that connection string isn't going to be much use.
What is your database? Your best option is probably to write a connection string which doesn't rely on a DSN, eg
connstr ="Provider=SQLOLEDB;Data Source=myServerAddress;Initial Catalog=YourDatabase;User Id=YourUserID;Password=YourPassword;"
would connect to Sql Server.
http://www.connectionstrings.com is a useful resource.
Upvotes: 1