date parambyname
Posted: Fri 13 Apr 2012 06:53
Hi
I encountered this problem.
this kind of expression doesn't always work properly:
query1: TMyQuery;
datecomponent: (3rd party component);
query1.parambyname('start_date').value := datecomponent.date;
I solved using:
query1.parambyname('start_date').asdate := datecomponent.date;
but I have a lot of code already written to fix and in some other case i don't know in advance if the param that i will pass to my query is a date or something else, so i must use ".value"
I encountered this problem.
this kind of expression doesn't always work properly:
query1: TMyQuery;
datecomponent: (3rd party component);
query1.parambyname('start_date').value := datecomponent.date;
I solved using:
query1.parambyname('start_date').asdate := datecomponent.date;
but I have a lot of code already written to fix and in some other case i don't know in advance if the param that i will pass to my query is a date or something else, so i must use ".value"