Solved

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

Posted on 1998-11-23
14
2,113 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
 
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
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.

708 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now