Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM SQL » View Thread |
Messages 1 to 3 of 3 total |
FloatToStr problem in European countries |
Thu, Sep 27 2007 12:18 PM | Permanent Link |
Michael Fullerton | DBISAM 3.30
I just found a really bad problem when using FloatToStr to convert a float to text for use in a query. Certain countries use a comma instead of a period for the decimal separator. DBISAM can't handle this (for ANSI Standard tables anyway). Besides using parameterixed queries or creating a lame function to convert commas to periods, what is the solution here? Note that I use the same SQL for big database servers too including MS SQL, MySQL and PostgresQL. Would these database have the same problem? |
Thu, Sep 27 2007 12:23 PM | Permanent Link |
Eryk Bottomley | Michael,
> this (for ANSI Standard tables anyway). Besides using parameterixed > queries or creating a lame function to convert commas to periods, what > is the solution here? Changing the DecimalSeparator variable at runtime would be the remaining possibility. Using parameters is the best solution however since that makes such issues transparent. Eryk |
Fri, Sep 28 2007 1:50 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Michael,
<< I just found a really bad problem when using FloatToStr to convert a float to text for use in a query. Certain countries use a comma instead of a period for the decimal separator. DBISAM can't handle this (for ANSI Standard tables anyway). Besides using parameterixed queries or creating a lame function to convert commas to periods, what is the solution here? >> See Eryk's response. You can also use this function in the dbisamlb.pas unit: AnsiFloatToStr() << Note that I use the same SQL for big database servers too including MS SQL, MySQL and PostgresQL. Would these database have the same problem? >> If they only accept the ANSI period separator for numerics like DBISAM, then yes. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Saturday, May 4, 2024 at 09:18 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |