DateTime Picker datetime values

When I compile a 64 bit application that uses the datetime value from a AdvDatePicker component as a parameter to SQL, it functions correctly.

When I compile the program as 32 bit, the system complains that the parameter is of the wrong type when the SQL executes.

The SQL statement does not change, not the database connection.  The SQL is accessed through ADOQuery:

Select * from manifests where MftDate between :StartDate and :EndDate

The query is setup:

MftQuery.Parameters.ParamByName('StartDate').value := StartDatePicker.datetime;
MftQuery.Parameters.ParamByName('EndDate').value := EndDatePicker.datetime;

How do I need to code so that BOTH 32 bit and 64 bit applications function?


Delphi XE7 and latest TMS Component pack, Windows 7 OS.

Not sure if this is an issue with TMS components.
Did you try to assign AdvDatePicker.DateTime to a datetime variable and use that variable as SQL parameter? If this also fails, the issue looks to be in the SQL and not in our component.