NisHera
11 years agoValued Contributor
Connecting to SQLServer 2012
Hi,
I'm trying to connct to SQLServer data base but failed
my basic script is something like this
Conn= Sys.OleObject("ADODB.Connection") ;
Conn.string = "MyString";
Conn.Open();
Conn.Execute("MyQuery",RowCount);
Conn.Close();
For "MyString" I have used following upto now...
But no success ...is anybody out there can help me..?
With first string returns empty
rest give something....... Named Pipes Provider: Could not open a connection to SQL Server [53].
I'm trying to connct to SQLServer data base but failed
my basic script is something like this
Conn= Sys.OleObject("ADODB.Connection") ;
Conn.string = "MyString";
Conn.Open();
Conn.Execute("MyQuery",RowCount);
Conn.Close();
For "MyString" I have used following upto now...
'Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=MyDB;Data Source=MachineName\SQLEXPRESS2012;'
'Provider=SQLNCLI11;Server=MachineName\SQLEXPRESS2012;Database=MyDB;Trusted_Connection=yes;'
'Driver={SQL Server Native Client 11.0};Server=myServerName\SQLEXPRESS2012;Database=MyDB;Trusted_Connection=yes;'
'Provider=SQLNCLI11;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=MyDB;Data Source=MachineName\SQLEXPRESS2012;'
But no success ...is anybody out there can help me..?
With first string returns empty
rest give something....... Named Pipes Provider: Could not open a connection to SQL Server [53].