![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 7 of 7 total |
![]() |
Mon, Jul 9 2012 12:18 PM | Permanent Link |
Rolf Frei eicom GmbH | Hi
I'm must to know, what the actual collation of the system is, as I want to uses this to create my DB. In DBISAM I did use this;: CREATE TABLE ...... LANGUAGE " + LanguagesList[GetIndexFromLanguageID(GetUserDefaultLangID)] + " SORT "Default Order" ...... How can I do this in EDB2? How can I get "DES", "ENU" or whatever the DB is created on? Regardds Rolf |
Tue, Jul 10 2012 3:27 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | Rolf
I don't think you can. In ElevateDB the collation is applied column by column and not to the database as a whole. Roy Lambert [Team Elevate] |
Tue, Jul 10 2012 7:36 AM | Permanent Link |
Rolf Frei eicom GmbH | Roy,
I think you didn't understand my question. I need to get the system or user default Collation of the Windows system, so I can pass that value to the Create Table statements as the collation of the fields. I don't want to hardcode this Collation, instead it must use the actual system collation. I don't have an idea how I can get that collation or what EDb function does return the system default collation, which I can pass to the Create Statment. Regards Rolf "Roy Lambert" schrieb im Newsbeitrag news:378ECFD6-AC51-4211-B6FB-FEB07B9132F3@news.elevatesoft.com... Rolf I don't think you can. In ElevateDB the collation is applied column by column and not to the database as a whole. Roy Lambert [Team Elevate] |
Tue, Jul 10 2012 8:55 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | Rolf
Have a look at this link http://stackoverflow.com/questions/5774928/get-short-windows-language-name You'll probably have to add code yourself to convert from what's reported to Tim's collation names but it should be easy enough. Roy Lambert [Team Elevate] |
Tue, Jul 10 2012 9:00 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | Rolf
A slightly simpler version http://www.festra.com/wwwboard/messages/1207.html Roy Lambert [Team Elevate] |
Tue, Jul 10 2012 9:00 AM | Permanent Link |
John Hay | Rolf
> I'm must to know, what the actual collation of the system is, as I want to > uses this to create my DB. In DBISAM I did use this;: > > > CREATE TABLE ...... > LANGUAGE " + LanguagesList[GetIndexFromLanguageID(GetUserDefaultLangID)] + " > SORT "Default Order" > ..... > > How can I do this in EDB2? How can I get "DES", "ENU" or whatever the DB is > created on? You can create your own function like function default_collation_name:string; var p:array[0..3] of char; i:integer; begin i := 4; getlocaleinfo(getuserdefaultlangid,LOCALE_SABBREVLANGNAME,p,i); result := p; end; John |
Tue, Jul 10 2012 11:32 AM | Permanent Link |
Rolf Frei eicom GmbH | Roy and John,
Thanks. I thougth EDB would give me a simple function for this. I have now looked at the Windows API and found the EDB routine GetLocalData. With this call it seems to give me what I want: Collation := edbenv.GetLocaleData(LOCALE_USER_DEFAULT, LOCALE_SABBREVLANGNAME); Regards Rolf "John Hay" schrieb im Newsbeitrag news:9FEA8641-0090-4B52-9184-77A6A2A9BEBC@news.elevatesoft.com... Rolf > I'm must to know, what the actual collation of the system is, as I want to > uses this to create my DB. In DBISAM I did use this;: > > > CREATE TABLE ...... > LANGUAGE " + LanguagesList[GetIndexFromLanguageID(GetUserDefaultLangID)] + > " > SORT "Default Order" > ..... > > How can I do this in EDB2? How can I get "DES", "ENU" or whatever the DB > is > created on? You can create your own function like function default_collation_name:string; var p:array[0..3] of char; i:integer; begin i := 4; getlocaleinfo(getuserdefaultlangid,LOCALE_SABBREVLANGNAME,p,i); result := p; end; John |
This web page was last updated on Wednesday, August 14, 2024 at 07:31 PM | Privacy Policy![]() © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |