chuatj
asked on
Urgent !!!! - Run-time error '40002'
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].
Run-time error '40002'
01000:[Microsoft][ODBC SQL Server Driver][DBNMPNTW].
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.
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.
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.
ASKER
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.
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
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
Write Connect String Please!!!
ASKER
The Connect String is as follows:
"DSN=DataSourceName;UID=Co mUser;PWD= ;"
"DSN=DataSourceName;UID=Co
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.
I once encounterd similar problem, but was rectified after i ran the service pack. You can try that too.
In dsn configuration change to IP Sockets from named pipes.
ASKER
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
Regards,
Tay Jin
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 ?
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 ?
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.
Check if you have of comunicattions protocol NAME PIPES or TCP/IP, and check your connection in ODBC.
ASKER
100 points should be awarded to Stefaan. As he was the first to raise to correct answer.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks very much.