View Single Post
  #3 (permalink)  
Old 05-14-2008
Shane Shane is offline
Administrator
 
Join Date: Jun 2006
Age: 25
Posts: 151
Rep Power: 10
Shane has disabled reputation
Default Re: Accessing SQL using a connection string

Hello Jeggebeen,

If you have configured an ASP page to access SQL database on another server you need to use your database username and password with database server IP address details.

It would not be an affect if anonymous access to the website. If the connection string uses a correct user account in connection strings then it will be working fine. For example I have posted below mentioned connection strings:

- DSN less connection
Dim SqlConn
Set SqlConn = Server.CreateObject("ADODB.Connection")
SqlConn.ConnectionString="Driver={SQL Server};" & _
"Server=server IP address;" & _
"Database=dbname;" & _
"Uid=username;" & _
"Pwd=password;"
SqlConn.Open
Response.Write "SQL Connection Successful"

Thanks,

Shane G.
AccuWebHosting.Com
Reply With Quote