🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #1289

Re: Searching on double precision fields

#1289
From: Michele Santucci
Date: Mon, 02 Aug 2004 19:09
49 lines
2651 bytes
Oki thnx this can be a good fix... but well there's not a way to set it to
the proper local symbol ?

"Mark Guerrieri" <mguerrieri@cmsgrp.com> ha scritto nel messaggio
news:410e625a$1@newsgroups.borland.com...
> In BCB6, the AnsiString(double) constructor internally calls FloatToStr,
> which uses the value of the global variable DecimalSeparator to represent
> the decimal point.  Try something like this:
>
> double Value;
> char OldDecimalSeparator = DecimalSeparator;
> DecimalSeparator = '.';
> DataSet1->Filter = "FloatField<=" + AnsiString( Value );
> DecimalSeparator = OldDecimalSeparator;
> DataSet1->Filtered=true;
>
> Mark
>
> "Michele Santucci" <michele.santucci.nospam@nospam.celinavio.it> wrote in
> message news:410e51f0@newsgroups.borland.com...
> > I have a field of a record (MS Access MDB file) defined as double
> precision
> > I need to query it at runtime using the Filter Adodataset property
> > If I do something of this kind
> >
> > double Value;
> > DataSet1->Filter = "FloatField<=" + AnsiString( double );
> > DataSet1->Filtered=true;
> >
> > I always got no result since the decimal separator in my local (italian)
> is
> > different from the default one of AnsiString.
> > And then if Value=10.3 the Filter property is set to "FloatField<=10,3"
> > If I try to execute the query manually using the original 10.3 notation
> the
> > query give the expected results.
> >
> > -- 
> > ================================
> > Michele Santucci
> > Software Development Manager
> > Celin Avio S.r.l.
> > Via Fontevivo, 21/M 19100 La Spezia
> > tel. +39-0187564080
> > ================================
> >
> >
>
>
Technical Details
Message-ID: <410e908d@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news1.google.com!news.glorb.com!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <410e51f0@newsgroups.borland.com> <410e625a$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,5515ed52d6570b06
X-Google-Attributes: gid10698b,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Michele Santucci" <michele.santucci@celinavio.it>
Newsgroups: borland.public.cppbuilder.database.ado
References: <410e51f0@newsgroups.borland.com> <410e625a$1@newsgroups.borland.com>
Subject: Re: Searching on double precision fields
Date: Mon, 2 Aug 2004 21:09:49 +0200
Lines: 51
Organization: Celin Avio S.r.l.
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 62.11.90.111
Message-ID: <410e908d@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1091473549 62.11.90.111 (2 Aug 2004 12:05:49 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news1.google.com!news.glorb.com!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail