Another Regional Options/Settings 'problem'

m0use

Registered User.
Local time
Today, 01:42
Joined
Mar 23, 2004
Messages
23
Hello readers,

How it (my dbase) works:

I have build a routine that automatically updates the starting database when another database with a name starting with: "UpdateV" + (text-field value) is found in the same folder. (Or you can browse to it through a interface...)

It then checks a table named: "Version" in both databases and if my criteria is true the starting database will update/replace all of its own objects with the objects contained in the update-database, re-compile, delete the update- database and (hence restarting) show the splashscreen with the new versionnumber.
(A new versionnumber and other criteria have been added to the existing "Version"-table.)

In the "Version" table I have a text-field called (of course...): "VersionNumber". The data is stored as: "1.0.1" (a number-field does not allow me to enter it like this...) and it is used in the splashscreen, to compare objects and, after a calculation described below, to append to the
update-database filename.

Ok, now, when we add the number 1 to the "VersionNumber"-field (made it a "Variant" first!) when the "Regional Options/Settings" - "Digit grouping symbol" is set to a "." (which we mostly use here) it will make "VersionNumber" = "1.0.2", which is the most important field because I use it to determine the correct order of update-filenames and this is the only field that is causing me problems...

The problem is:

When the "Digit grouping symbol" is set as "," (as on "English (UK)" systems) it will fail to add 1 ...alas as expected.

Ok, I know, I can split the string on the digit symbol and read and compare each part, or trap the error when it occurs and replace the "."'s with ","'s and continue... that's the quick and dirty way... and requires some coding... but my dbase was already build that way and I'm tidying up now and wonder...

Is there a friendlier way of doing this so the "Regional Options" won't matter, or maybe someone knows a way to read it's settings?

I have the feeling I'm overlooking something (or maybe overdoing...?), this should be quite simple to solve, but I've already spend too many hours on this and I have to get on with other stuff in this dbase... maybe I'm searching too hard to see the easy answer ahead...

Any suggestions about how to do this different than explained above are very much appreciated.

Y'all thinking about this already makes my day. Thanks in advance, m0use. ;-)

B.t.w. many thanks to this forum. I learned a lot about handling "Date" -formats and much more important other stuff that set my creative mind in gear...

My experience of this site to any reader of this post:

Search and search again, it all depends on the search terms you use, read and learn. You'll find what you need right here, or the links to it.
 

Users who are viewing this thread

Back
Top Bottom