Solved

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

Posted on 1998-11-23
14
2,358 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
Free Webinar: AWS Backup & DR

Join our upcoming webinar with experts from AWS, CloudBerry Lab, and the Town of Edgartown IT to discuss best practices for simplifying online backup management and cutting costs.

 
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

Technology Partners: 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

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
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 INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

726 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