What is the proper connection string for SQL Server 2005 Express on XP?
I want to connect to the master database by VBScript as the following:
Dim computer : computer = CreateObject("WScript.Network").ComputerName
Dim connectionString:connectionString = "Provider=SQLOLEDB.1;Integrated
Security=SSPI;Persist Security Info=False;Initial Catalog=Master;Data
Source=" + computer
Dim connection
Set connection= CreateObject("ADODB.Connection")
With connection
.Provider = "SQLOLEDB"
.ConnectionString = connectionString
.Open
End With
It works on MSDE. But I got a "[DBNETLIB][ConnectionOpen (Connect())
.]SQL
Server does not exist or access denied. " error for SQL Express. I have the
TCP/IP enabled for SQL Server Express too.
Thanks.take help from KBA
http://support.microsoft.com/defaul...b;EN-US;Q328306 and
http://www.connectionstrings.com/ for all types of connection strings.
--
--
Satya SKJ
Visit http://www.sql-server-performance.com for tips and articles on
Performance topic.
"Roy" wrote:
> What is the proper connection string for SQL Server 2005 Express on XP?
> I want to connect to the master database by VBScript as the following:
> Dim computer : computer = CreateObject("WScript.Network").ComputerName
> Dim connectionString:connectionString = "Provider=SQLOLEDB.1;Integrated
> Security=SSPI;Persist Security Info=False;Initial Catalog=Master;Data
> Source=" + computer
> Dim connection
> Set connection= CreateObject("ADODB.Connection")
> With connection
> .Provider = "SQLOLEDB"
> .ConnectionString = connectionString
> .Open
> End With
> It works on MSDE. But I got a "[DBNETLIB][ConnectionOpen (Connect(
)).]SQL
> Server does not exist or access denied. " error for SQL Express. I have th
e
> TCP/IP enabled for SQL Server Express too.
> Thanks.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment