Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 Database Design and Application Architecture
 using ODBC data source to connect to SQL 2012
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

1 Posts

Posted - 08/08/2012 :  16:52:20  Show Profile  Reply with Quote
I am trying to connect using ODBC Data source to my SQL server 2012 database using the following string
Provider=SQLNCLI11;Server=SQLSERVER2012;Data Source=omsGUAS;Integrated Security=SSPI;User ID=sa;pwd=Naina2010;DataTypeCompatibility=80;MARS Connection=False;

and it does not work from Excel VBA while I have tested the ODBC connection using ODBC connection wizard. I get "can not connect to SQL server error". However, if I replace the Database name instead of ODBC Database name, it works as follows:

Provider=SQLNCLI11;Server=SQLSERVER2012;Database=omsGUAS_OMS;Integrated Security=SSPI;User ID=sa;pwd=Naina2010;DataTypeCompatibility=80;MARS Connection=True;

What am I missing here. First string used to work with SQL 2000 and I have migrated the database successfully to SQL 2012 in 2 phase steps.
Any help and/or suggestion would be appreciated.

Almighty SQL Goddess

38200 Posts

Posted - 08/08/2012 :  17:32:31  Show Profile  Visit tkizer's Homepage  Reply with Quote
This applies to 2012 too:

You are mixing SQL and Windows authentication in your connection strings.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server

Subscribe to my blog
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000