Solved

[ODBC SQL Server Driver][Named Pipes] Access denied

Posted on 2001-08-27
16
607 Views
Last Modified: 2012-05-04
I have a VB program to update a distant SQL Server database. The database is located at my web host, MaximumASP.

It works fine on my computer and several others around, but on machines in another network I get the following error when trying to open the connection:

[Microsoft][ODBC SQL Server Driver][Named Pipes]Access
denied.

Here's the very simple code for opening the connection:
 
  strConnString = "DRIVER=SQL Server;SERVER=maxsql002.maximumasp.com;UID=uid;PWD=pwd;"  
  Set db = New Connection
  db.ConnectionString = strConnString
  db.CursorLocation = adUseClient
  db.Open


It's probably some configuration issues with the second network, but I really don't know where to look...

Any ideas?
0
Comment
Question by:faxx
  • 7
  • 5
  • 2
  • +2
16 Comments
 
LVL 18

Accepted Solution

by:
bobbit31 earned 200 total points
ID: 6429527
check your odbc datasources on the offending machines... i'm guessing you do not have the entry for maxsql002...
0
 

Author Comment

by:faxx
ID: 6429538
maxsql002.maximumasp.com is not a DSN, it's the adress of the SQL Server...
0
 
LVL 18

Expert Comment

by:bobbit31
ID: 6429661
does it work if you use the ip address of the server instead?
0
 
LVL 18

Expert Comment

by:bobbit31
ID: 6429798
try this instead:
"DRIVER=SQL Server;Network Library=DBMSSOCN;SERVER=216.26.160.7;UID=uid;PWD=pwd;"

the Network Library settings specifies to use tcp/ip instead of named pipes
0
 

Expert Comment

by:rpappu091100
ID: 6430023
Goto Client Network utilities and change the prtocol type from Named Pipes to TCP/IP.
0
 
LVL 18

Expert Comment

by:bobbit31
ID: 6430066
rpappu:
Tips on Comments and Answers
Comments
Comments are intended to be used as a collaboration tool. Many Experts choose to post their solutions as comments only.

Answers
An answer is a specific solution to a question and should be submitted if it will solve the questioner's problem and doesn't duplicate a previous comment.

Comment Vs. Answer
If you are unsure of your solution, post it as a comment. Members can accept comments as solutions and award you Expert Points for them.

For more tips on comments and answers, click here.


faxx: rather than having to do what rpappu suggests on each of the client machines, you can just use the connection string i showed above which does the same thing.
0
 

Author Comment

by:faxx
ID: 6430402
I'm waiting for someone else to try it, and if it works I'll give the points...
0
 

Expert Comment

by:rpappu091100
ID: 6434064
Try this one
Check the permissions for the Database user.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:faxx
ID: 6440749
It doesn't works neither. I'll try it from another place...
0
 
LVL 18

Expert Comment

by:bobbit31
ID: 6440876
ok, if that's not working, you might want to make sure you have the proper files on the client machines...

NETLIB     DBNSSPXN.DLL     spx
     DBNMPNTW.DLL     named pipes
     DBMSRPCN.DLL     multiprotocol
     DBMSSOCN.DLL     windows sockets

these should be in MDAC 2.1 or 2.5 whichever one you are using... be sure to include this in your install package
0
 

Author Comment

by:faxx
ID: 6441744
"DRIVER=SQL Server;Network Library=DBMSSOCN;SERVER=216.26.160.7;UID=uid;PWD=pwd;"

Gives me the following errer

[Microsoft][Gestionnaire de pilotes ODBC] Source de donnees non trouvee et nom de pilote non specifie

which means somethings like "data source not found and driver not specified"

???
0
 
LVL 18

Expert Comment

by:bobbit31
ID: 6441835
it seems as though you do not have mdac installed on the offending machines.  are you using the package and deployment wizard to create your install package?
0
 

Author Comment

by:faxx
ID: 6441875
Yes, I'm using the package and deployment wizard...
0
 
LVL 18

Expert Comment

by:bobbit31
ID: 6441894
are you including mdac_typ.exe in your install?

under project/references, select microsoft data access components 2.5

re-package your app and then re-install... it should install mdac first and then it will install your app.

hopefully that should do the trick.

good luck!
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7205195
Hi faxx,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept bobbit31's comment(s) as an answer.

faxx, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 5

Expert Comment

by:Netminder
ID: 7240630
Per recommendation, force-accepted.

Netminder
CS Moderator
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

864 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

24 Experts available now in Live!

Get 1:1 Help Now