rruth
asked on
ASP and SQL connection 2005
Experts,
I need help setting up a SQL Server 2005 db connection using ASP. I have no problem connecting using Access but because SQL doesn't have a physical address to link to, I'm not sure how to set it up. I'm using XP and SQL Server is working fine when I connect using Coldfusion.
Thanks for your help
I need help setting up a SQL Server 2005 db connection using ASP. I have no problem connecting using Access but because SQL doesn't have a physical address to link to, I'm not sure how to set it up. I'm using XP and SQL Server is working fine when I connect using Coldfusion.
Thanks for your help
ASKER
I've tried to set this up like the examples I have for the Access db. Where am I going wrong? - Thank you for your help!
<%
serverName = "BABYRUTH4\SQLEXPRESS"
MyDatabase = "empsolutions"
MyUserId = "sa"
MyPassword = "password"
Set conn1 = Server.CreateObject("ADODB .Connectio n")
conn1.Open "Provider=" & SQLNCLI;Server=serverName; Database=M yDatabase; UID=MyUser Id;PWD=MyP assword;
Set RS1 = Server.CreateObject("ADODB .Recordset ")
%>
<%
serverName = "BABYRUTH4\SQLEXPRESS"
MyDatabase = "empsolutions"
MyUserId = "sa"
MyPassword = "password"
Set conn1 = Server.CreateObject("ADODB
conn1.Open "Provider=" & SQLNCLI;Server=serverName;
Set RS1 = Server.CreateObject("ADODB
%>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
acperkins,
Thanks that worked great!
Thanks that worked great!
Provider=SQLNCLI;Server=Yo