?
Solved

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

Posted on 1998-11-23
14
Medium Priority
?
2,906 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
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
This shares a stored procedure to retrieve permissions for a given user on the current database or across all databases on a server.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how the fundamental information of how to create a table.
Suggested Courses

850 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