Subject Re: [IBO] Empty string and NULL value
Author Helen Borrie
At 06:19 AM 4/10/2005 +0000, you wrote:
>I'm new to IBO and have converted my first project from BDE.
>Now I have a problem with empty string (or 0) values. My
>procedure "DatasetToCDS" to copy data into a Clientdataset
>doesn't work with IBO. I had no problem with BDE.
>The source is a IBOQuery. An error occurs, when the fieldvalue is an
>empty string (or maybe 0??) as part of the primary-key.
>But an empty string (not NULL) should be possible.
>Also ACDS.Fields[i].AsString := Source.Fields[i].AsString do not work.
> ACDS.Fielddefs.clear;
> ACDS.Fielddefs.assign(Source.Fielddefs);
> ACDS.CreateDataset;
> While not Source.EOF do
> begin
> ACDS.Append;
> For i:=0 to Source.Fieldcount-1 do
> ACDS.Fields[i].assign(Source.Fields[i]);
> ACDS.Post; <----------------- Exception: value required!
> end;

Might a curious person ask what you are trying to achieve with this?