Subject | Re: [IBO] D2010 and 4.9.9 |
---|---|
Author | Geoff Worboys |
Post date | 2010-02-23T00:32:17Z |
Alan wrote:
"maybe". But when I reread your original post:
It is interesting that the error is explicitly UnicodeString.
That implies it is probably coming from the TDataset side of
things, since most of the IBO side is AnsiString (unless you
have been using explicit WideString requests).
I suggest putting a breakpoint in db.pas for assignments to
TParam (.SetAsVariant, .SetAsString and .SetAsWideString) to
see if you can see where the blank string is coming from.
(In particular be on the look-out for "Unassigned" variants
coming from IBO - there are some differences in handling of
these between TDataSet and TIB_DataSet that seem like they
could cause a problem. Note that an Unassigned variant will
convert without error to a blank string (or zero number).)
(Which is to say that I do not think your suggested fix is
truly safe - it may hide other/real problems. We need to
isolate why you are getting a blank string in this situation.)
--
Geoff Worboys
Telesis Computing
> the debugger shows me this:Given my experiences with Delphi 2010 I would have to say...
> In this case I have an ACol.Value = 42 and an AParam.Value = ''
> if Aparam.Value were null, the debugger would say null ... no?
"maybe". But when I reread your original post:
>>> Could not convert variant of type (UnicodeString) into type (Double)that proves it is indeed a string value in the parameter.
It is interesting that the error is explicitly UnicodeString.
That implies it is probably coming from the TDataset side of
things, since most of the IBO side is AnsiString (unless you
have been using explicit WideString requests).
I suggest putting a breakpoint in db.pas for assignments to
TParam (.SetAsVariant, .SetAsString and .SetAsWideString) to
see if you can see where the blank string is coming from.
(In particular be on the look-out for "Unassigned" variants
coming from IBO - there are some differences in handling of
these between TDataSet and TIB_DataSet that seem like they
could cause a problem. Note that an Unassigned variant will
convert without error to a blank string (or zero number).)
(Which is to say that I do not think your suggested fix is
truly safe - it may hide other/real problems. We need to
isolate why you are getting a blank string in this situation.)
--
Geoff Worboys
Telesis Computing