Connection Pipe Error SQL Express 2005

W

Wayne

I need to Connect to the SQL Server Database for data extraction without
using linked tables. The SQL Database and Access DB are local.

I keep getting the following Error
Named Pipes Provider: Invalid Parameters -87
-2147467259 (80004005)

The Server version is:
SQL Server Express 2005
SQL Server 9.0.2047

The pipes that are enabled are:

SQL 2005 Network Configuration
\\.\pipe\MSSQL$SQLEXPRESS\sql\query

Sql Native Client Configuration
sql\query



It's an Acess 2003 ADP
Port 1433 Microsoft Server Port is blocked by the MAcaffee Firewall -
Possible problem?


The procedure is below and was set up to get the connection syntax right
without a lot of code involved.

Private Sub cmdTest_Click()
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
Set cn = New ADODB.Connection


cn.ConnectionString = "Provider=SQL Native Client; Data
Source=\\DELLE510_A\SQLExpress; Initial Catalog=FleetSQL;
Trusted_Connection=yes"

cn.Open
rs.Open "Select * FROM tblOrders", cn

rs.MoveLast
MsgBox rs.RecordCount


If anyone would have any suggestion on how to eliminate the error it would
be vefy helpful, it may be obvious to someone else. Thanks in advance for
your help.

Sincerely,

Wayne
 
B

Brendan Reynolds

Wayne said:
I need to Connect to the SQL Server Database for data extraction without
using linked tables. The SQL Database and Access DB are local.

I keep getting the following Error
Named Pipes Provider: Invalid Parameters -87
-2147467259 (80004005)

The Server version is:
SQL Server Express 2005
SQL Server 9.0.2047

The pipes that are enabled are:

SQL 2005 Network Configuration
\\.\pipe\MSSQL$SQLEXPRESS\sql\query

Sql Native Client Configuration
sql\query



It's an Acess 2003 ADP
Port 1433 Microsoft Server Port is blocked by the MAcaffee Firewall -
Possible problem?


The procedure is below and was set up to get the connection syntax right
without a lot of code involved.

Private Sub cmdTest_Click()
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
Set cn = New ADODB.Connection


cn.ConnectionString = "Provider=SQL Native Client; Data
Source=\\DELLE510_A\SQLExpress; Initial Catalog=FleetSQL;
Trusted_Connection=yes"

cn.Open
rs.Open "Select * FROM tblOrders", cn

rs.MoveLast
MsgBox rs.RecordCount


If anyone would have any suggestion on how to eliminate the error it would
be vefy helpful, it may be obvious to someone else. Thanks in advance for
your help.

Sincerely,

Wayne


It seems to be the double backslash in front of the server name. The
following code works for me, with your server and database names changed to
a server and database available to me, but I can reproduce your error if I
insert the double backslashes before the server name.

Public Sub TestSub()

Dim cn As ADODB.Connection
Set cn = New ADODB.Connection

cn.ConnectionString = "Provider=SQL Native Client; " & _
"Data Source=k9\SQLExpress; " & _
"Initial Catalog=classes; Trusted_Connection=yes"

cn.Open

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top