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
Solved

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

Posted on 1998-11-23
14
2,307 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
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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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 100 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Suggested Solutions

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

856 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