Subject Re: [IBO] Strange SQL results with large text field
Author Hans
It is workable by assigning say specific sizes to your ftMemo fields, like
4999, 5999, 6999
and modify the test where the IB_Session variable is used to return FtMemo
when
the size in (4999,5999,6999) else a ftString. You can use any algorithme
that fits
your requirements.


----- Original Message -----
From: "Robert martin" <rob@...>
To: <IBObjects@yahoogroups.com>
Sent: Monday, April 07, 2008 3:03 PM
Subject: Re: [IBO] Strange SQL results with large text field


> Hi
>
> Changing that to 4096 fixes the problem for me !
>
> However what impact will this have on all the other applications I
> develop? What are the side effects? Surely this is still an issue when
> the ftMemo data type being is returned? (Seems to me the ftMemo is not
> being cleared when their is no text).
>
> p.s. I see you put that override in, Ta :)
>
> Rob Martin
> Software Engineer
>
> phone +64 03 377 0495
> fax +64 03 377 0496
> web www.chreos.com
>
> Wild Software Ltd
>
>
>
> Hans wrote:
>> If possibly applicable, by default, IBO returns a ftString if StrLen <=
>> 255,
>> else a ftMemo. This can be overridden in IB_Session.pas
>>
>> ----- Original Message -----
>> From: "Ramil" <khabibr@...>
>> To: <IBObjects@yahoogroups.com>
>> Sent: Sunday, April 06, 2008 10:57 PM
>> Subject: Re[2]: [IBO] Strange SQL results with large text field
>>
>>
>>
>>> 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
>>>>
>>> --
>>> Best regards,
>>> Ramil R. Khabibullin khabibr@...
>>>
>>>
>>> ------------------------------------
>>>
>>> ___________________________________________________________________________
>>> 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
>>>
>>>
>>>
>>>
>>
>>
>> ------------------------------------
>>
>> ___________________________________________________________________________
>> 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
>>
>>
>>
>>
>>
>
> ------------------------------------
>
> ___________________________________________________________________________
> 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
>
>
>
>