Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 6 of 6 total |
String & Float conversion |
Thu, May 25 2006 5:50 PM | Permanent Link |
"Clive" | Hi,
I have this query.. Update "\memory\tmp_interest" set value = value + ' + FloatToStr(dODInterest) Which all works fine with For Example English Regional setting. If I change my PC over to Swedish for example the FloatToStr converts the float into 2583,33333333333 (Note the comma instead of a decimal point) DBISAM doesnt like it?.. How should I be doing this. I guess using a Paramater query but It doesnt really suit. 'Update "\memory\tmp_interest" set value = value + 2583,33333333333 where period = '2006-04-01'' My question is how are you supposed to convert Floats to strings in a manner DBISAM likes for currencies that use comma's as decmial points. Cheers Clive. |
Thu, May 25 2006 6:09 PM | Permanent Link |
Jeff Cook | "Clive" <dd@dddd.com> wrote on Fri, 26 May 2006 09:48:11 +1200
>Hi, >I have this query.. > >Update "\memory\tmp_interest" set value = value + ' + >FloatToStr(dODInterest) > > >Which all works fine with For Example English Regional setting. > >If I change my PC over to Swedish for example the FloatToStr converts the >float into 2583,33333333333 (Note the comma instead of a decimal point) >DBISAM doesnt like it?.. How should I be doing this. I guess using a >Paramater query but It doesnt really suit. > >'Update "\memory\tmp_interest" set value = value + 2583,33333333333 where >period = '2006-04-01'' > >My question is how are you supposed to convert Floats to strings in a manner >DBISAM likes for currencies that use comma's as decmial points. > > >Cheers >Clive. > > Clive From the v3 Help:- =========================================== DBISAM provides several functions in the DBISAMLB.PAS unit for converting data back and forth from ANSI/ISO format. They are as follows: .. .. .. function AnsiFloatToStr(Value: Extended): string; ============================================ Cheers Jeff -- Jeff Cook Aspect Systems Ltd Phone: +64-9-424 5388 Skype: jeffcooknz www.aspect.co.nz |
Thu, May 25 2006 7:18 PM | Permanent Link |
"Clive" | Hi Jeff,
I figured it out.. Using FloatToStr with a TFormatsettings Parameter.. Works fine.. Cheers Clive. "Jeff Cook" <jeffc@aspect.co.nz> wrote in message news:FCF31860-FC6A-468D-8433-1ECB1F879DFC@news.elevatesoft.com... > "Clive" <dd@dddd.com> wrote on Fri, 26 May 2006 09:48:11 +1200 > >>Hi, >>I have this query.. >> >>Update "\memory\tmp_interest" set value = value + ' + >>FloatToStr(dODInterest) >> >> >>Which all works fine with For Example English Regional setting. >> >>If I change my PC over to Swedish for example the FloatToStr converts the >>float into 2583,33333333333 (Note the comma instead of a decimal point) >>DBISAM doesnt like it?.. How should I be doing this. I guess using a >>Paramater query but It doesnt really suit. >> >>'Update "\memory\tmp_interest" set value = value + 2583,33333333333 where >>period = '2006-04-01'' >> >>My question is how are you supposed to convert Floats to strings in a >>manner >>DBISAM likes for currencies that use comma's as decmial points. >> >> >>Cheers >>Clive. >> >> > Clive > > > From the v3 Help:- > =========================================== > DBISAM provides several functions in the DBISAMLB.PAS unit for converting > data back and forth from ANSI/ISO format. They are as follows: > . > . > . > function AnsiFloatToStr(Value: Extended): string; > ============================================ > Cheers > > Jeff > -- > Jeff Cook > Aspect Systems Ltd > Phone: +64-9-424 5388 > Skype: jeffcooknz > www.aspect.co.nz > > > > |
Thu, May 25 2006 7:45 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Clive,
<< My question is how are you supposed to convert Floats to strings in a manner DBISAM likes for currencies that use comma's as decmial points. >> Check out this TDBISAMEngine method: http://www.elevatesoft.com/dbisam4d5_tdbisamengine_floattoansistr.htm -- Tim Young Elevate Software www.elevatesoft.com |
Fri, May 26 2006 8:28 PM | Permanent Link |
"Clive" | RTFM, you mean..
"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote in message news:FFDB91D3-C99D-411C-9CBF-D12497E91A86@news.elevatesoft.com... > Clive, > > << My question is how are you supposed to convert Floats to strings in a > manner DBISAM likes for currencies that use comma's as decmial points. >> > > Check out this TDBISAMEngine method: > > http://www.elevatesoft.com/dbisam4d5_tdbisamengine_floattoansistr.htm > > -- > Tim Young > Elevate Software > www.elevatesoft.com > > |
Tue, May 30 2006 8:55 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Clive,
<< RTFM, you mean.. >> Nah, I'd never say that. I've never been a fan of those types of responses since we all are sometimes just freakin' tired and want a quick answer without having to dredge through a manual. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Tuesday, April 30, 2024 at 03:55 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |