Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 2 of 2 total |
Locale setting |
Thu, Oct 30 2008 5:21 AM | Permanent Link |
"Petter Topp" | Hi all.
I have just discovered that I have been rather inconsistent on setting the tables locale when creating a new one. Some of my tables are set to the Norwegian locale and other to ANSI Standard. (This was discovered when installing my apps. on a XPe device - error 15878). Now I wonder: 1. Must this setting (Locale) be set manually, or will dbsys at some point set this value depending on the structure of the table? 2. What effect will the ANSI Standard have, except sorting order for special charaters (The correct Local should be Norwegian)? 3. Are there perfomance issues related to the Locale setting. Regards Petter Topp Norway Delphi 2007, Dbisam 4 |
Thu, Oct 30 2008 5:50 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Petter
DBSys won't do it for you, it can be used but it will require manual intervention. As part of my conversion to ElevateDB I decided I'd move everything to ANSI. Here's the small function you should be able to adapt it for your needs simply. procedure AlterCollation(ACurDir: string); var SearchRec: TSearchRec; iRet: Integer; begin glProgress1.Caption := 'Altering collation to ANSI .. [%d%%]'; glProgress1.Percent := 0; Cntr := 0; if ACurDir[Length(ACurDir)] <> '\' then ACurDir := ACurDir + '\'; iRet := FindFirst(ACurDir + '*.dat', faAnyFile, SearchRec); Changer.DatabaseName := ACurDir; while iRet = 0 do begin if (SearchRec.Name <> '.') and (SearchRec.Name <> '..') then begin inc(Cntr); glProgress1.Percent := Min(100, Cntr); glProgress1.Update; Changer.Close; Changer.SQL.Clear; Changer.SQL.Text := 'ALTER TABLE ' + Copy(ExtractFileName(SearchRec.Name), 1, Pos('.', ExtractFileName(SearchRec.Name)) - 1) + ' LOCALE CODE 0 NOBACKUP'; Changer.ExecSQL; Changer.Close; try Assist.Active := True; except end; if Assist.Active then Assist.Close; end; iRet := FindNext(SearchRec); end; FindClose(SearchRec); end; Roy Lambert |
This web page was last updated on Tuesday, April 23, 2024 at 08:10 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |