Map a DateTime property to a Date Field in DBF

Dec 12, 2012 at 2:42 PM


How can I save an object with a datetime property in a DBF? The problem is that the field in the dbf is date and not datetime. I cannot change the type in the DBF. (compatibility problems with another app).

The SQL query is generated successfully but during the update of the db record an exception is raised! "Syntax error." I checked the query manually, the value of the field is datetime not date! How can I changed this mapping manually?

BTW: I copied the query to FoxPro, changed the parameter to Date() and everything was working well.


Thank you,


Dec 12, 2012 at 3:20 PM
Edited Dec 12, 2012 at 3:33 PM

I just tested inserting and updating a date field (Northwind.Orders.OrderDate) and it worked as expected.  Could you provide a sample project that demonstrates the problem?  You can email it to me at

Dec 12, 2012 at 6:51 PM


it is not so easzy to create an example project, because of the database.

How does your SQL Statemant (in the Output Window) look like? Is the Date Parameter a datatime or a data value?

Can you copy this statement please?




Dec 12, 2012 at 9:34 PM

I added an example in check out Sample16.