I'm currently using an OLEDB connection to connect to SQL Server 2016 for all my submodules which utilize a connection string containing a special keyword: DataTypeCompatibility.
Ex:
Provider=SQLNCLI11;Server=servername;Database=myDatabaseName;Persist Security Info=False;DataTypeCompatibility=80;User ID=foo;
Is there a way to modify a SqlParameter connection string to use a DataTypeCompatibility keyword within my legacy code?
mySQLConn = New SqlConnection()
mySQLConn.ConnectionString = strConn
mySQLConn.Open()
SQLcommand= New SqlCommand("stored_procedure", mySQLConn)
SQLcommand.CommandType = CommandType.StoredProcedure
SQLcommand.CommandTimeout = 0