Subject Re: [IBO] D2010 and 4.9.9
Author Alan
> Alan wrote:
> > the debugger shows me this:
> > In this case I have an ACol.Value = 42 and an AParam.Value = ''
> > if Aparam.Value were null, the debugger would say null ... no?
>
> Given my experiences with Delphi 2010 I would have to say...
> "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.

interesting also that I never assign double values. I only ever assign integers. Why is it trying to convert '' emptystring to double? This ACol is of type LargeInt. In the case of IBO sets I often assign to AsString from AsString - left over from when the IBO stuff didn't have LargeInt.

>
> 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).

no I've not been doing anything here.

>
>
> 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.)
>

I try what you suggest - thanks
Alan

> --
> Geoff Worboys
> Telesis Computing
>