What Type System Version (Compatibility Level) token can I specify in ADO.NET connection string to indicate that only SQL Server 2012 is supported?
What Type System Version (Compatibility Level) token can I specify in ADO.NET connection string
Share
According to this it will be “SQL Server 2012”. While the page is for the .NET framework 4.5 and thus still pre release, given the other possible values for the parameter, it is safe to assume that this value will stand.
Having that said, I don’t know if any .NET version below 4.5 will even accept that value as valid. I’m not at a computer right now, so I cannot check, sorry.
EDIT It looks as if this value is indeed parsed/checked on the client side, i.e. inside
System.Data. Looking with Reflector, it happens inSqlConnectionString.SqlConnectionString(string connectionString). Also, there is an enumerationSqlConnectionString.TypeSystemwhich names all the known/supported values. For .NET 4.0 that would beSqlServer2000,SqlServer2005,SqlServer2008andLatest. This value is the passed around inside theSystem.Data.SqlClientclasses and ends up being used somewhere insideSqlDataReader.So, unless you use
Latestwhich would use but not force SQL Server 2012, there is no way to force SQL Server 2012 type system with .NET < 4.5.