?
Solved

Need connection string for asp page using SQL Server Express 2008 instance

Posted on 2014-09-11
3
Medium Priority
?
362 Views
Last Modified: 2014-09-17
I need a connection string for connecting an asp page to SQL Server Express 2008 instance.

I am currently using:
Dim connGlobal, mSQL1, rs1
set connGlobal = server.createobject("ADODB.Connection")
connGlobal.Open "Provider=SQLOLEDB.1;Data Source=SERVER\EXACTSQLEXPRESS;Initial Catalog=intranet; User ID=userid;Password=password;"
'mSQL1 = "SELECT * FROM extensions"

Open in new window


All I get is:

500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.
0
Comment
Question by:princeservice
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 2000 total points
ID: 40317726
I installed SQL Native Client to make the connections to SQL Server Express 2008.  This is an example of a connection string using it.
connectstr = "Provider=SQLNCLI10;Server=YOURSERVER\SQLEXPRESS;Database=TestDB;Uid=username; Pwd=password;"

Open in new window

If your code is running on the machine that has SQL Server Express 2008 on it, then the SQL Native Client is already installed.  If you are running on a different machine, then you need to install SQL Native Client and enable Remote Connections on the server and make sure both the server and the client have TCP/IP connections enabled.  http://www.connectionstrings.com/download-sql-server-native-client/
0
 

Author Comment

by:princeservice
ID: 40328478
I used your connection string but as soon as I do a connectstr.open I get the 500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 40328638
That connection string works between two of my machines.  I assume the ASP page and the SQL Server are on different machines.  That means that you have enable remote connections on the SQL Server and have a username and password that is allowed to connect remotely.
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question