Subject Re: [IBO] Add Text to a BLOB-Field
Author guido.klapperich@t-online.de
But the problem only exist, when A and B are NOT Null, so checking the fields to
NULL doesn't change anything.

Luiz Alves wrote:

> > The same as before. s is A, t is B, but s+t is A, when A is not NULL and
> s+t is
> > B, when A is NULL.
>
> Change to:
>
> var s,t:String;
>
> qry.edit;
>
> if qry.fieldbyname('A').isnull then s:=''
> else s:=qry.fieldbyname('A').asString;
>
> if qry.fieldbyname('B').isnull then t:=''
> else t:=qry.fieldbyname('B').asString;
>
> qry.fieldbyname('A').asString:=s+t;
>
> qry.post;
>
> Or,
> If the result of s+t is empty and you want use Null instead of a empty
> string, you can use:
> ....
> ....
> if (s+t)='' then
> qry.fieldbyname('A').Clear
> else qry.fieldbyname('A').asString:=s+t;
> qry.post;
>
> PS: Maybe there is a small bug in IBO in this case, when the first value is
> null.
> qry.fieldbyname('A').asString:=qry.fieldbyname('A').asString+qry.fieldbyname
> ('B').asString;
> should give the correct result in my opinion.
>
> Luiz.
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/