Connection string to connect sql server 2008 which is in another server
29,251
Solution 1
I am using something like this:
C#
"Data Source=host's ip\\SQLEXPRESS;Initial Catalog=yourddbb;User ID=youruser;Password=yourpassword"
ASP 3.0
StrConex= ""
StrConex= StrConex & "Provider=SQLOLEDB.1;Password=yourpasswd;"
StrConex= StrConex & "Persist Security Info=True;User ID=youruser;"
StrConex= StrConex & "Initial Catalog=yourddbb;Data Source=host's ip\SQLEXPRESS"
Solution 2
Try --
Dim oConn
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open "Driver={SQL Server};Server=53.90.111.22;Database=crm_user;Uid=cos_user;Pwd=1q2w3e4r5t"
Author by
Anuya
Updated on December 29, 2020Comments
-
Anuya over 3 years
I use the below connection string to connect to a sqlserver 2008 located in another server. How to i connect to it from ASP using vbscript?
application("database_connectionstring_internal") = "DRIVER=SQL Server;SERVER=53.90.111.22;DATABASE=crm_cos;UID=cos_user;PASSWORD=1q2w3e4r5t"
Here are my server details :
Database server : Server IP - 53.90.111.22
Sql server name - SCD13B
User name - cos_user
password - 1q2w3e4r5t
Database name - crm_user