Access Denied Error

Posted on 2005-05-04
Last Modified: 2008-01-09
I am using the following DSNLESS connection to access info from sql server 2003 and I am getting the following error

      set cn = Server.CreateObject("ADODB.Connection")
      cn.connectionstring = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=iwilliams;Password=4161023;Initial Catalog=CustomerMaster;Data Source=CITSCUSTMAST"

Microsoft OLE DB Provider for SQL Server (0x80004005)
[DBNMPNTW]Access denied.

any idea how to correct this problem

thank you
Question by:krbnldy
    LVL 65

    Expert Comment

    by:Jim Horn
    A correct UserID and password? has a detailed listing of many connection string templates.

    Hope this helps.

    Author Comment

    yes i have the correct user name and password
    LVL 1

    Accepted Solution


    You should check if the protocols in your client configuration match those accepted by you configuration of SQL server. Run the client configuration utility, cliconfg.exe and check if it is not using named pipes (I recommend TCP/IP) as the default protocol. Then, check on the server if it is also using TCP/IP as the default protocol (run svrnetcn.exe).

    Hope this helps.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    I guess that all of us know that caching the data usually increase the performance, but I worried if all of us are aware about the risk that caching the data provides and how to minimize this.  That’s the reason why I decided to write this short art…
    SQL Command Tool comes with APEX under SQL Workshop. It helps us to make changes on the database directly using a graphical user interface. This helps us writing any SQL/ PLSQL queries and execute it on the database and we can create any database ob…
    Video by: Steve
    Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    755 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

    21 Experts available now in Live!

    Get 1:1 Help Now