I am working with a classic ASP application that we are trying to keep hobbling along while it gets rewritten. The underlying database has been upgraded many times and is currently running on SQL Server 2008.
Recently a column of table was updated from a smalldatetime (with a check constraint to ensure it didn't have any time values) to simply the date type, but the code now does not work. I was originally using SQLOLEDB, and was confident that treating
the date as a string would be find with our client. Unfortunately it does not, nor does it work using the SQLNCLI10 client.
This is the stripped down code:
Set adoConnection = aspServer.CreateObject("ADODB.Connection")
adoConnection.Open "Provider=SQLNCLI10" ' Details Removed
Set adoRS = aspServer.CreateObject("ADODB.Recordset")
adoRS.CursorLocation = adUseClient
adoRS.Open "SELECT * FROM TestTable WHERE id = 0", adoConnection, adOpenKeyset, adLockOptimistic, adCmdText
adoRS("datecolumn") = "09/20/2010"
On the update line, I get the following error:
Microsoft SQL Server Native Client 10.0
View Complete Post