0
votes

This is a fairly noob question. I'm trying to set up a dev environment on my own machine by setting up a copy of a prod environment. To do so, I'm setting up a connection to a SQL Server database from classic ASP. I am a bit new both ASP and SQL Server, so I'm having some difficulties.

I imported a backup of the database already, and got that setup. Here is the db_connection file I have:

<% 
Set conn = Server.CreateObject("ADODB.Connection")
conn.open "myDatabase", "myLogin", "myPassword"

%>

This all works fine on the prod server, but on my machine I get:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

What driver would I need to download and where would I need to put it? Or is that really the issue here?

1
Have you checked thisEmmanuel N
@EmmanuelN Thanks, that had some useful info. The problem was even simpler than all that, though, I just needed to use a connection string.Indigenuity

1 Answers

2
votes

It looks like its looking for a 'Data Source Name' file, but there's another way.

try opening the DB connection using a 'connection string' it should look something like:

conn.open "Provider=SQLOLEDB.1;Persist Security Info=False; 
uid= myLogin; pwd=myPassword;Initial Catalog=myDatabase;Data Source=myServer"