Subject | Re: Filtering |
---|---|
Author | munster77054 |
Post date | 2011-01-21T06:48:48Z |
The end result, was there was a data issue within the database. Data in a field was computed before it was put into the table. Because for instance 1234567890 was expected, based on the code, but the computed info put in the table was 2345678901, so that's why there was a problem with the filter!
--- In firebird-support@yahoogroups.com, "munster77054" <munster77054@...> wrote:
>
> A friend has asked me to post this for him.
> ===========================================
> I hope that someone can help me here. I have an application that I'm building 95% done, but I've ran into a snag, that for some reason I can't see what I'm missing.
>
> I have a firebird db, with two fields defined as:
>
> LO_NBR_ BIGINT NOT NULL
> HI_NBR_ BIGINT NOT NULL
>
> The above is used, because I have to store numbers up to 5,000,000,000, and according to FB BIGINT covers:
>
> 9,223,372,036,854,775,807
>
> Given this
> number1 = 3289661541 (unsigned long int)
> number2 = 3289661550 (unsigned long int)
>
> I then try to filter the records
>
> as_the_filter := StrToFloat(number1) + '>=' + FloatToStr(lo_nbr) + ' and ' + StrToFloat(number1) + '<=' + FloatToStr(hi_nbr);
>
> I then kick in the filtering, and it is NO WERE NEAR the record I'm expecting. I don't know if it's my C++ background that messing me up, or what.
>
> NOTE: I'm not on my normal computer, so if the syntax is off, forgive me, but you get the idea.
>
> Help please!
>