Page 1 of 1

MS-SQL Server 2005 Connection String to Connect via IP

Posted: Thu Dec 17, 2009 6:43 am
by anserkk
Hi,

I am using ADO
Can any one provide the ADO connection string to connect to a MS-SQL Server 2005 via Internet (Via IP On a Remote Server)

I tried the following but was unsuccessful

Code: Select all | Expand

cConnectSring:="Data Source=xxx.xxx.xxx.xxx,1433;Network Library=DBMSSOCN;Initial Catalog=DataBaseName;User ID=username;Password=password;"


Dear Mr.Antonio

This is for your information While compiling I am getting warning message which says duplicate declaration
In ADO.CH, I checked ADO.CH and found that the duplicate declaration exist in the file

I am not sure anybody else is having the same problem.

Code: Select all | Expand

D:\FWH\include\ADO.Ch(196) Warning W0001  Redefinition or duplicate definition of #define adSearchForward
D:\FWH\include\ADO.Ch(197) Warning W0001  Redefinition or duplicate definition of #define adSearchBackward



ADO.CH

Code: Select all | Expand

*** Line 191 Constant Group: SearchDirectionEnum
#define adSearchForward 1
#define adSearchBackward -1

*** Line 195 Constant Group: SearchDirection
#define adSearchForward 1
#define adSearchBackward -1

 
Regards
Anser

Re: MS-SQL Server 2005 Conn String to Connect via IP (Solved)

Posted: Thu Dec 17, 2009 7:20 am
by anserkk
Problem solved,

Code: Select all | Expand

"Provider=SQLOLEDB;server=xxx.xxx.xxx.xxx;database=DbName;uid=UserName;pwd=password"


Regards
Anser