Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

connection to sql 2005

Status
Not open for further replies.

chapm4

IS-IT--Management
Nov 12, 2001
38
US
Hi,
I am editing asp pages that did connect to access to now connect to sql 2005. I started using Microsoft Visual Web Developer and can create a new site, drag and drop the connection string, set it up, do a data view and everyting is great. The problem is someone else before me set up the Access and ASP pages. They are not very complex but I don't have a lot of time to figure out what he did and recreate the pages. Can someone show me how to change the code below to connect to a sql 2005 database? This will be across the net so I suppose the connection string will be tcpip?? Lets call the ip 0.0.0.0 , the database database, the user user, and the password pass.

<%
set cn=server.createobject("ADODB.connection")
cn.open "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE="&server.mapPath("database.mdb")
set r=server.createobject("adodb.recordset")
%>
 
Tnks for reply DNG. I have looked at connectionstrings.com, but couldn't figure out how to transpose what I had to sql 2005. Can nyone help?
 
SQL 2005 and SQL 2000 will be no different in your connection

General FAQ faq333-2924
5 steps to asking a question faq333-3811
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top