Subject | Strange SQL results with large text field |
---|---|
Author | Robert martin |
Post date | 2008-04-07T03:05:29Z |
Hi
I have an SQL which i run on a FB DB using a TIBOQuery. The Query has a
Datasource attached which an TADOQuery connects to. The TADOQuery has
an Insert query that takes the resulting fields and inserts them into a
'foreign' DB. I loop through the TIBOQuery and run the TADOQuery
insert once ofr each record. This is a data export tool.
This has worked fine for years but we have recently discovered an issue
(that may be related to us upgrading our version of IBObjects). On some
fields the TIBOQuery shows results when there are none. i.e.
on one record Stock0015 should be Null however
FieldByName('Stock0015').AsString lists lots of text (from another prior
record maybe 100 records prior), however FieldByName('Stock0015').IsNull
correctly returns True.
The field in question is a VarChar(2048).
If I refresh the query the values are then correct.
If I run the query in an SQL tool they also show correctly (including a
tool written with TIBO components).
What can I do?
--
Rob Martin
Software Engineer
phone +64 03 377 0495
fax +64 03 377 0496
web www.chreos.com
Wild Software Ltd
I have an SQL which i run on a FB DB using a TIBOQuery. The Query has a
Datasource attached which an TADOQuery connects to. The TADOQuery has
an Insert query that takes the resulting fields and inserts them into a
'foreign' DB. I loop through the TIBOQuery and run the TADOQuery
insert once ofr each record. This is a data export tool.
This has worked fine for years but we have recently discovered an issue
(that may be related to us upgrading our version of IBObjects). On some
fields the TIBOQuery shows results when there are none. i.e.
on one record Stock0015 should be Null however
FieldByName('Stock0015').AsString lists lots of text (from another prior
record maybe 100 records prior), however FieldByName('Stock0015').IsNull
correctly returns True.
The field in question is a VarChar(2048).
If I refresh the query the values are then correct.
If I run the query in an SQL tool they also show correctly (including a
tool written with TIBO components).
What can I do?
--
Rob Martin
Software Engineer
phone +64 03 377 0495
fax +64 03 377 0496
web www.chreos.com
Wild Software Ltd