?
Solved

Urgent !!!! - Run-time error '40002'

Posted on 1998-11-23
14
Medium Priority
?
2,654 Views
Last Modified: 2008-03-17
The GUI of my application is developed using Visual Basic 5.0 and it talks to the SQL Server 6.5 DB. While executing on of the menu option, I encountered this error message:
Run-time error '40002'
01000:[Microsoft][ODBC SQL Server Driver][DBNMPNTW].
0
Comment
Question by:chuatj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
14 Comments
 
LVL 3

Expert Comment

by:Stefaan
ID: 1091942
The DBNMPNTW.DLL is net Net-Library for Named Pipes, so I guess there is something wrong whit the Net-Library of the Client (or the Server).  Check if the Network Libraries are installed on the Client PC.  If they are installed on the client PC, check if there is a PATH reference to the directory in which the DLL's are stored.

0
 

Expert Comment

by:idswizzard
ID: 1091943
I would check the ODBC driver for the SQL database in either the user or the system DSN area of ODBC32.  This can happen when the system can not open the database using the ODBC call using named pipes.

The second would be to check permissions on the database table you are trying to access.  This can also trip it up.

However, if you can go to the ODBC control panel and successfully attach to the server, then the ODBC driver should work in the code.  Just make sure your attach string is correct.
0
 

Author Comment

by:chuatj
ID: 1091944
The ODBC driver are OK, as we are able to connect to the database. And it is also not the problem of permission to access certain table, because such problem would not cause run time error. In fact, we are trying the proposal put up by Stefaan, as the problem only happened to one of the clients.
0
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
LVL 3

Expert Comment

by:Stefaan
ID: 1091945
Chuatj,

I'm almost sure the problem lies with one of the client DLL's.  Try to reinstall the client files on that PC, and also make sure you applied the same Service Pack on all client machines as the one you applied to the SQL Server itself.

I looked through the Books Online, but couldn't find anything there neither.  Just that the DLL which is causing the problem is the Net Library for communication through Named Pipes.

I hope you will be able to solve your problem.

Greetings and Best Regards,


Stefaan Lesage

E-mail : Stefaan.Lesage@eca.be
0
 
LVL 3

Expert Comment

by:hakyemez
ID: 1091946
Write Connect String Please!!!

0
 

Author Comment

by:chuatj
ID: 1091947
The Connect String is as follows:

"DSN=DataSourceName;UID=ComUser;PWD=;"
0
 

Expert Comment

by:Rakesh010499
ID: 1091948
Where exactly you encountered this error? Menu in your VB application?
I once encounterd similar problem, but was rectified after i ran the service pack. You can try that too.  
0
 
LVL 2

Expert Comment

by:jbnorman
ID: 1091949
In dsn configuration change to IP Sockets from named pipes.
0
 

Author Comment

by:chuatj
ID: 1091950
Stefaan's answer is the correct one. We have tried that and it seems that it is the DBNMPNTW.DLL file problem. Sorry for the late reply, Stefaan.

Regards,
Tay Jin
0
 
LVL 3

Expert Comment

by:Stefaan
ID: 1091951
Hi,

Well actually I thought it would be something like I said.  I remember I once had a similar error.

Greetings and best regards,


Stefaan Lesage

P.S. : Does this mean I'll get the points ?
0
 

Expert Comment

by:WendolynB
ID: 1091952
Please! Check if you have in the directory winnt\system32  of DBNMPNTW.DLL and
Check if you have of comunicattions protocol NAME PIPES or TCP/IP, and check your connection in ODBC.
0
 

Author Comment

by:chuatj
ID: 1091953
100 points should be awarded to Stefaan. As he was the first to raise to correct answer.
0
 
LVL 3

Accepted Solution

by:
Stefaan earned 300 total points
ID: 1091954
I will simply post the answer again.

Chuatj,

I'm almost sure the problem lies with one of the client DLL's.  Try to reinstall the client files on that PC, and also make sure you applied the same Service Pack on all client machines as the one you applied to the SQL Server itself.

I looked through the Books Online, but couldn't find anything there neither.  Just that the DLL which is causing the problem is the Net Library for communication through Named Pipes.

I hope you will be able to solve your problem.

Greetings and Best Regards,


Stefaan Lesage

E-mail : Stefaan.Lesage@eca.be

0
 

Author Comment

by:chuatj
ID: 1091955
Thanks very much.
0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question