[Lazarus] Using parameters with sqldb
JoshyFun
joshyfun at gmail.com
Tue Sep 29 13:17:35 CEST 2009
Hello waldo,
Tuesday, September 29, 2009, 6:32:22 AM, you wrote:
>> .ParamByname('filtro').AsString:='TESTE%';
>>
>> .Value is not a good friend.
wk> then why does it exist if not usable?? :? :(
It is usable, but as it involves variants some conversions could
happend in an unexpected way. In fact .value is the only way I know to
set the a field to NULL (variant value).
If filtro was a INTEGER field this code:
.ParamByname('filtro').Value:='1234';
what should it do ? Raise an error or convert the '1234' to 1234 ?
From my point of view it is always better to use the typed forms.
--
Best regards,
JoshyFun
More information about the Lazarus
mailing list