We are in the process of moving our application from an ODBC to OLE DB connection to our SQL Server database. We are having issues with the fact that OLE DB seems to be more strict with its datatypes.
For example, I have a time variable that is attempting to insert into a datetime column in the database. Previously with ODBC it would insert 1900-01-01+time. Now every place this is occurring is throwing an error about mismatched datatypes. We have been fixing these occurrences as they appear but wondering if there is a way to globally fix the issue in the connection parameters.
I would recommend that you move to the latest Microsoft SS DB Client called "MSOLEDBSQL" as this is MS's stated direction for SQL Server 2016 & higher going forward. MS has deprecated SNC & OLE-DB DB clients. Food for thought.
the one great thing about oledb client is that it is/was included in all windows OS installs by default. Not sure 100% about 11, but i think it may be in there too.
Thank you for your response. We are using MSOLEDBSQL but the problem we are having with it is the errors we are getting about mismatched datatypes. We have many cases of time variables being inserted into a datetime SQL column that are throwing errors now that weren't before using ODBC. We are wondering if there is a way to correct this globally instead of on a case by case basis. Sorry if my post wasn't clear.
You probably need to find out from microsoft since it is their driver. My guess is that microsoft at that time allowed that code to work because they did not have a time datatype in the database. now they do, so they won't allow that kind of mismatch.
There are no replies made for this question yet. However, you are not allowed to reply to this question.
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here. Register Here »
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.
the one great thing about oledb client is that it is/was included in all windows OS installs by default. Not sure 100% about 11, but i think it may be in there too.