John Novack

John Novack

  • NA
  • 3
  • 2.4k

Add ODBC driver to Visual Studio 2012

Aug 6 2015 12:17 PM

While I have coded in many languages and platforms over 40 years (including Windows since 3.0), this is my first project using .NET for a new client.  I'm using ADO.NET MVC 4 on Visual Studio 2012.  The application is an Intranet MVC application using Windows authentication.  The database (for development) is an internal VS SQL Server Compact 4.0 Local Database within the project. I am having frustration getting the built-in connection mechanisms to the database to do exactly what I want to (.NET keeps doing what IT thinks I want to do and bloating out what should be simple queries).  I just want to install an ODBC driver and use the ODBC connection to directly issue SQL statements.  Unfortunately, there is no ODBC driver included in .NET.

1. How do I get an ODBC device driver for .NET and install it into Visual Studio?
2. What should my connection string be when I am using an Intranet app piggybacking on internal Windows authentication (no uid or pwd needed in connection string)?
 
FWIW, the database location is at C:\Dev\CriticalNotes\CriticalNotes\App_Data\CriticalNotes.spf
 
I will be very appreciative of a rapid response...
 
The only alternative would seem to be installing NHibernate, but that is also overkill for what this app has to do database-wise. 
 
Thanks in advance


 


Answers (3)