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/default...;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 the
> TCP/IP enabled for SQL Server Express too.
> Thanks.
Showing posts with label vbscript. Show all posts
Showing posts with label vbscript. Show all posts
Friday, February 24, 2012
Coonection to SQL Server 2005 Express
Coonection to SQL Server 2005 Express
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.
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.
Sunday, February 12, 2012
Converting problem
Hello there
I'm imporing data from csv files.
one of the field with data lile '20060105' should be converted to date.
Vbscript isdate function cannot convert it to date, but sql server can
convert it.
Does someone knows whay?"Roy Goldhammer" <roy@.hotmail.com> wrote in message
news:O7A0OcAdGHA.3388@.TK2MSFTNGP05.phx.gbl...
> Hello there
> I'm imporing data from csv files.
> one of the field with data lile '20060105' should be converted to date.
> Vbscript isdate function cannot convert it to date, but sql server can
> convert it.
> Does someone knows whay?
>
Because SQL is better than VB Script? :-)
Regards
Colin Dawson
www.cjdawson.com|||when you do an import, the data in the column in the import file is matched
up with the column in the table. an implicit conversion occurs to get load
the data into the table. your text string '20060105' is converted/seen as
'YYYYMMDD'. Thus tis a valid value.
vb hostscript will intepret the value just as a string.
-oj
"Roy Goldhammer" <roy@.hotmail.com> wrote in message
news:O7A0OcAdGHA.3388@.TK2MSFTNGP05.phx.gbl...
> Hello there
> I'm imporing data from csv files.
> one of the field with data lile '20060105' should be converted to date.
> Vbscript isdate function cannot convert it to date, but sql server can
> convert it.
> Does someone knows whay?
>
I'm imporing data from csv files.
one of the field with data lile '20060105' should be converted to date.
Vbscript isdate function cannot convert it to date, but sql server can
convert it.
Does someone knows whay?"Roy Goldhammer" <roy@.hotmail.com> wrote in message
news:O7A0OcAdGHA.3388@.TK2MSFTNGP05.phx.gbl...
> Hello there
> I'm imporing data from csv files.
> one of the field with data lile '20060105' should be converted to date.
> Vbscript isdate function cannot convert it to date, but sql server can
> convert it.
> Does someone knows whay?
>
Because SQL is better than VB Script? :-)
Regards
Colin Dawson
www.cjdawson.com|||when you do an import, the data in the column in the import file is matched
up with the column in the table. an implicit conversion occurs to get load
the data into the table. your text string '20060105' is converted/seen as
'YYYYMMDD'. Thus tis a valid value.
vb hostscript will intepret the value just as a string.
-oj
"Roy Goldhammer" <roy@.hotmail.com> wrote in message
news:O7A0OcAdGHA.3388@.TK2MSFTNGP05.phx.gbl...
> Hello there
> I'm imporing data from csv files.
> one of the field with data lile '20060105' should be converted to date.
> Vbscript isdate function cannot convert it to date, but sql server can
> convert it.
> Does someone knows whay?
>
Subscribe to:
Posts (Atom)