SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
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
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sheekom
Starting Member

USA
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.

tkizer
Almighty SQL Goddess

USA
36997 Posts

Posted - 08/08/2012 :  17:32:31  Show Profile  Visit tkizer's Homepage  Reply with Quote
This applies to 2012 too: http://www.connectionstrings.com/sql-server-2008

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

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
  Previous Topic Topic Next Topic  
 New 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.06 seconds. Powered By: Snitz Forums 2000