Trying to update MS Access table with datetime column in Where clasuse
-
I am trying to update a MS ACCESS table that has a column defined as a datetime type. The update looks like: string updateSQL = "update Perform " + " set venueCd = ?, " + " performanceDTTM = ?, " + " performanceDesc = ?, " + "lotteryPerformance = ?, " + " lotteryAsgnComplete = ?, " + " performHandicapLogic = ?, " + " maxNumOfCompTks = ?, " + " maxNumOfAdditionalTks = ?, " + " costOfEachAddTk = ? " + " where venueCd = ? and " + " performanceDTTM = ?"; I am using a OleDbType.Date parm to pass in the value of the date time. The value is correct in the parameter and there is a row that it should find and update. Any help would be appreciated. Thanks, Patrick
-
I am trying to update a MS ACCESS table that has a column defined as a datetime type. The update looks like: string updateSQL = "update Perform " + " set venueCd = ?, " + " performanceDTTM = ?, " + " performanceDesc = ?, " + "lotteryPerformance = ?, " + " lotteryAsgnComplete = ?, " + " performHandicapLogic = ?, " + " maxNumOfCompTks = ?, " + " maxNumOfAdditionalTks = ?, " + " costOfEachAddTk = ? " + " where venueCd = ? and " + " performanceDTTM = ?"; I am using a OleDbType.Date parm to pass in the value of the date time. The value is correct in the parameter and there is a row that it should find and update. Any help would be appreciated. Thanks, Patrick
Even down to the millisecond? (Just a thought - I've been caught out with that in the past)
Upcoming events: * Glasgow: Introduction to AJAX (2nd May), SQL Server 2005 - XML and XML Query Plans, Mock Objects, SQL Server Reporting Services... Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton My website
-
Even down to the millisecond? (Just a thought - I've been caught out with that in the past)
Upcoming events: * Glasgow: Introduction to AJAX (2nd May), SQL Server 2005 - XML and XML Query Plans, Mock Objects, SQL Server Reporting Services... Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton My website
that is a good question. I can view the data in ms access and it does not display sectonds or milliseconds. The value I am passing in is actually read from the row that I am trying to update from a prior select. Colin, is there anything special I should do since I am working with dates with MS Access? Patrick
-
that is a good question. I can view the data in ms access and it does not display sectonds or milliseconds. The value I am passing in is actually read from the row that I am trying to update from a prior select. Colin, is there anything special I should do since I am working with dates with MS Access? Patrick