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

Actually I cant in this case because the fields are actually user
defined sizes (up to 4096) we have a screen where they can create
'custom' storage fields. Your fix seems to work, but I think it justs
hides an underlying bug in the way ftMemo is handled. I can build an
exe to ship with the const set to 4097 and then reset it back down to
255 for now. But I think Jason needs to fix it (assuming it is an IBO
issue as opposed to a Delphi / TDataset issue.

It did work previously (on an older IBO version and an Older Delphi
version (6 v 2007). So I don't know who the culpret is :)

Rob Martin
Software Engineer

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

Wild Software Ltd



Hans wrote:
> 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
>>
>>
>>
>>
>>
>
>
>
> ------------------------------------
>
> ___________________________________________________________________________
> 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
>
>
>
>
>