ODBC connection string has me stumped... RRS feed

  • Question

  • User-1487454548 posted

    Something changed between VB10 / Sql2008 and VB17/SQL12   I'm struggling.

    Using OdbcConnectionStringBuilder(startstring), 

    • Giving it:  Driver={SQL Server};Server=`companyserverMSSQL.corp.this.com/instance`;Database=DBNAME;User ID=`DB_User`;Password=`Test1234`
    • Results in:  Driver={SQL Server};server=`companyserverMSSQL.corp.this.com/instance`;database=DBNAME;user id=`DB_User`;password=`Test1234`

    15 second timeout.

    Turns out error message details improve if you comment out your try..catch mechanism until this is fixed.

    Message=ERROR [08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.
    ERROR [01000] [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()).
    ERROR [01S00] [Microsoft][ODBC SQL Server Driver]Invalid connection string attribute

    I am unable to find a way of giving the server address that makes this happy.

    But, the query mechanism that uses an ODBC DSN in a CAD package works great!

    Friday, December 14, 2018 9:14 PM

All replies

  • User1520731567 posted

    Hi rfinley,

    Basically, when you failed to connect to your SQL Server, the issue could be:

     1) Network issue,

    2) SQL Server configuration issue.

    3) Firewall issue,

    4) Client driver issue,

    5) Application configuration issue.

    6) Authentication and logon issue.

    Try and read through this blog article about Steps to troubleshoot SQL connectivity issues and go through this:


    Hope my answer will helpful to you.

    Best Regards.

    Yuki Tao

    Monday, December 17, 2018 8:46 AM
  • User-1487454548 posted

    Thank you for your reply Yuki.

    As far as I can tell, the slash on server name was backwards, User ID should be Username.

    (great way to spend two days blocked by this.)

    This needs to operate in parallel to a CAD system that had no problems making queries.  Now it's working..

    Thanks again.

    Monday, December 17, 2018 6:05 PM