web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

CCADO - SQL Server does not exist or access denied

(0) ShareShare
ReportReport
Posted on by 120

I am unable to connect to an SQL2005 instance using CCADO. The error returned is:

Method 'open' in COM object of class 'ADODB.Connection' returned error code 0x80004005 (E_FAIL) which means: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

I can connect to the actual AXDB server using the following example below, but any other SQL instance returns the above error message.

    ccadoconnection connSQL2005;
    connSQL2005 = new ccadoconnection();
    connSQL2005.connectionString(
        'Provider=sqloledb; server=sqlserver\instance; Initial Catalog=master; ' +
//        'Provider=sqloledb; server=axdb; Initial Catalog=master; ' +
        'Integrated Security=SSPI');
//          'User ID=sa; Password=******');

    connSQL2005.open();

Additional Information:

  • Our SQL server is running Win2003 and runs on a cluster with an instance name.
  • AXAOS runs under a domain admin account.
  • The domain admin account has access to the SQL server.
  • Everything is on the same network so there are no firewall issues

 

*This post is locked for comments

I have the same question (0)
  • JasonW Profile Picture
    120 on at
    Re: CCADO - SQL Server does not exist or access denied

    Solved it!

    I tried every possible connection string for OLEDB that I could think of and in the end it came down to simply changing the '\' in the server_name\instance to '\\'!

    So to connect to an SQL Server with instance name the following connection strings work (provider can also be sqlncli):

        connSQL2005.connectionString(
            'Provider=sqloledb; server=server_name\\instance; Initial Catalog=master; ' +
            'Integrated Security=SSPI');

    or

        connSQL2005.connectionString(
            'Provider=sqloledb; server=server_name\\instance; Initial Catalog=master; ' +
            'User ID=sa; Password=******);

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Syed Haris Shah Profile Picture

Syed Haris Shah 9

#2
Mea_ Profile Picture

Mea_ 4

#3
Martin Dráb Profile Picture

Martin Dráb 2 Most Valuable Professional

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans