Subject Re: [firebird-support] Filtering
Author Woody
From: "munster77054" <munster77054@...>
> 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);
>

Not a Firebird question, but that seems like Delphi syntax. You are mixing
up the StrToFloat and FloatToStr. You can't add a number to a string. They
should all read IntToStr anyway since you are only using integers and not
floating point variables.

Woody (TMW)