Subject Re: [IBO] Strange SQL results with large text field
Author Robert martin
Hi

It definitely fails. Hans's solution fixes the problem. I suspect in
your sample data you need a record with some data in the field, then
some NUll records (My Null data is actually part of a JOIN where no
record exists (i.e. not just a NULL STock0015 but the entire record is
null).

Rob Martin
Software Engineer

phone +64 03 377 0495
fax +64 03 377 0496
web www.chreos.com

Wild Software Ltd



Robert martin wrote:
> Hi Ramil
>
> I am using version 4.8.6
>
> I try your code below in mine (I hadn't thought of testing it that way,
> thanks) and make sure it does trigger.
>
> I will get back to you :)
>
> Rob Martin
> Software Engineer
>
> phone +64 03 377 0495
> fax +64 03 377 0496
> web www.chreos.com
>
> Wild Software Ltd
>
>
>
> Ramil wrote:
>
>> Hello Robert,
>>
>> I can not reproduce your situation.
>>
>> I have added the field "Stock0015" to the IBO sample database MASTER
>> (IBO\Samples\TDataset\Filters):
>>
>> ALTER TABLE MASTER
>> ADD Stock0015 VarChar(2048);
>>
>> I have filled the table with large texts mixed up with nulls.
>> And I execute this:
>>
>> procedure TForm1.Button2Click(Sender: TObject);
>> begin
>> while not qryMaster.eof do
>> begin
>> if (qryMaster.FieldByName('Stock0015').AsString <> '')
>> and qryMaster.FieldByName('Stock0015').IsNull then
>> ShowMessage('Here I am!');
>> qryMaster.Next
>> end;
>> end;
>>
>> What version of IBO and Firebird you have used?
>> Can you send me database or a little demo-program with source that
>> reproduce this situation?
>>
>>
>>
>>
>>>
>>>
>>>
>>>
>>>
>>> Hi Helen
>>>
>>>
>> >> Well, the place to start would be to look at the code where you pick up the text from the current IBODataset row to pass it to the ADOQuery parameter. Of special interest would be whether you are relying on some record number property that isn't valid for an IBO set...or where you might be treating null and empty string somewhere as though they were equivalent.
>> >>
>> >>
>>
>>
>>>
>>> There is no code ! The IBOQuery result fields have the same as the
>>> parameters in the TADOQuery. The TADOQuery is set to use the TIBOQuery
>>> as the .Datasource. Sorry I should have been clearer.
>>>
>>> After loading master and source (IBO AND ADO respectively) SQL
>>> statements from a script. I loop through something like
>>>
>>> IBOQuery.first;
>>> while (IBOQuery.Eof = False) do begin
>>> ADOQuery.ExecSQL;
>>>
>>> IBOQuery.Next;
>>> end;
>>>
>>> I thought the problem was with the ADO Query but I put a break point on
>>> before the .ExecSQL and used the 'Evaluate/Modify' tool in Delphi to
>>> view the data in the IBOQuery at that point.
>>> FieldByName('Stock0015').AsString <> '' but
>>> FieldByName('Stock0015').IsNull = True !
>>>
>>> Sorry about using Delphi syntax for those non Delphi people.
>>>
>>> Hope that makes the problem clearer.
>>>
>>> Rob Martin
>>> Software Engineer
>>>
>>> phone +64 03 377 0495
>>> fax +64 03 377 0496
>>> web www.chreos.com
>>>
>>> Wild Software Ltd
>>>
>>>
>>
>>
>
> ------------------------------------
>
> ___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
> ___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info papers,
> keyword-searchable FAQ, community code contributions and more ! Yahoo! Groups Links
>
>
>
>
>