Connection to SQL 2000 
Author Message
 Connection to SQL 2000

I use the following ado connection string to sucessfully
connect through to our SQL7 server:

strConnection = "Provider=sqloledb;Data
Source=Squirrel;User ID=myUser;Password=myPassword;Initial
Catalog=myDatabase"

I need to connect through to an "identical" database on
SQL2000.  However, SQL2000 apparently creates instances of
the databases that have a back-slash in the name.  My ado
connection string should therefore be changed to:

strConnection = "Provider=sqloledb;Data
Source=Flash\dbName;User
ID=myUser;Password=myPassword;Initial Catalog=myDatabase"

And this gives me error:

Microsoft OLE DB Provider for SQL Server error '80004005'
[DBNMPNTW]ConnectionOpen (CreateFile()).

Any ideas please?

Thanks

Griff



Sun, 18 Jul 2004 23:34:29 GMT
 Connection to SQL 2000

Hi,

Just wrap your server name into apostrophies (').

strConnection = "Provider=sqloledb;Data
Source='Flash\dbName';User
ID=myUser;Password=myPassword;Initial Catalog=myDatabase"

Val

Quote:
>-----Original Message-----
>I use the following ado connection string to sucessfully
>connect through to our SQL7 server:

>strConnection = "Provider=sqloledb;Data
>Source=Squirrel;User

ID=myUser;Password=myPassword;Initial
Quote:
>Catalog=myDatabase"

>I need to connect through to an "identical" database on
>SQL2000.  However, SQL2000 apparently creates instances
of
>the databases that have a back-slash in the name.  My ado
>connection string should therefore be changed to:

>strConnection = "Provider=sqloledb;Data
>Source=Flash\dbName;User
>ID=myUser;Password=myPassword;Initial Catalog=myDatabase"

>And this gives me error:

>Microsoft OLE DB Provider for SQL Server error '80004005'
>[DBNMPNTW]ConnectionOpen (CreateFile()).

>Any ideas please?

>Thanks

>Griff

>.



Mon, 19 Jul 2004 00:05:08 GMT
 Connection to SQL 2000
A small hint: with the FileBrowser create a file with the
extension ".udl", then dblclick on this file and you get a
nice dialogue-box. when finished, you can open this .udl-
file with an editor like notepad and see the string you
search...
Quote:
>-----Original Message-----
>I use the following ado connection string to sucessfully
>connect through to our SQL7 server:

>strConnection = "Provider=sqloledb;Data
>Source=Squirrel;User

ID=myUser;Password=myPassword;Initial
Quote:
>Catalog=myDatabase"

>I need to connect through to an "identical" database on
>SQL2000.  However, SQL2000 apparently creates instances
of
>the databases that have a back-slash in the name.  My ado
>connection string should therefore be changed to:

>strConnection = "Provider=sqloledb;Data
>Source=Flash\dbName;User
>ID=myUser;Password=myPassword;Initial Catalog=myDatabase"

>And this gives me error:

>Microsoft OLE DB Provider for SQL Server error '80004005'
>[DBNMPNTW]ConnectionOpen (CreateFile()).

>Any ideas please?

>Thanks

>Griff

>.



Mon, 19 Jul 2004 00:06:56 GMT
 Connection to SQL 2000

Quote:

>I use the following ado connection string to sucessfully
>connect through to our SQL7 server:

>strConnection = "Provider=sqloledb;Data
>Source=Squirrel;User ID=myUser;Password=myPassword;Initial
>Catalog=myDatabase"

>I need to connect through to an "identical" database on
>SQL2000.  However, SQL2000 apparently creates instances of
>the databases that have a back-slash in the name.  My ado
>connection string should therefore be changed to:

>strConnection = "Provider=sqloledb;Data
>Source=Flash\dbName;User
>ID=myUser;Password=myPassword;Initial Catalog=myDatabase"

>And this gives me error:

>Microsoft OLE DB Provider for SQL Server error '80004005'
>[DBNMPNTW]ConnectionOpen (CreateFile()).
>Any ideas please?

Griff,
You must have MDAC 2.6 installed.  Prior versions of MDAC do not know how
to deal with the SQL Server "instance name" in the connection string's data source.  

You can download the latest version of MDAC 2.6 from
http://www.microsoft.com/data/download.htm#26sp1info

Thanks,
Carl Prothman
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.



Mon, 19 Jul 2004 09:31:27 GMT
 
 [ 4 post ] 

 Relevant Pages 

1. Connection to SQL 2000 without trusted connection

2. SQL 7.0 connection with SQL 2000

3. Problem with Connection Pervasive SQL 2000 an MS SQL Server 7.0

4. Problem with Connection Pervasive SQL 2000 an MS SQL Server 7.0

5. DNS Connection to SQL 2000 Instance

6. Secure connection with SQL 2000

7. Slow connection to SQL 2000 on other computer

8. DSN and ODBC connections in SQL 2000

9. Step By Step Connection to SQL 2000 Remotely

10. securing an ODBC connection to SQL 2000

11. connection security (SQL 2000)

12. ODBC connection to SQL 2000 from Access


 
Powered by phpBB® Forum Software