Now, I'm using Windows 7 x32, SQL Server Express, on IIS, with C#. The following code works.
using (SqlConnection con = new SqlConnection(@"Data Source=localhost\SQLEXPRESS;Initial Catalog=personnet;Integrated Security=Yes;"))
But when I try replacing all the Sql to Odbc, I get this error.
Exception Details: System.Data.Odbc.OdbcException: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
I do not think it is the connectionstring. I do think my database is compatible with odbc. See
I do not think it's anything related to x64 since I'm on a x32 OS. My provider is Sql Server Native Client 11.0. If I do try to add the provider, the keyword Provider is not recognized. I do believe I have the installed ODBC drivers. I installed ODBC Driver 11 for SQL Server just to make sure, but no luck. This is all on localhost, so I don't believe in adding to System DSN.