SET COLLATION TABLE

Xbase++ 2.0 Build 554 or later
Message
Author
Victorio
Posts: 633
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

SET COLLATION TABLE

#1 Post by Victorio »

Hi,

In collat.ch are defined several collat tables, SYSTEM,GERMAN,BRITISH... and also COLLAT_USER.
If I change SetCollation() to GERMAN, in created CDX file is name of collation TAG GERMAN,
If AMERICAN, also AMERICAN

But if I want change to USER, error occur :

PROCEDURE dbeSys()
SET COLLATION TO SYSTEM - work
SET COLLATION TO ASCII - work
SET COLLATION TO GERMAN - work
SET COLLATION TO USER - ??? error

[Error] POKUS.PRG(207): XBT0200: Syntax Error

Why this error ? in Collat.ch this COLLAT_USER is defined.

Also one thing: is possible change COLLAT_USER name to my own name ? I need have COLLAT_SLOVAK.

I am tired from this problem, why exist country diacritics ?????... :angry-banghead:

User avatar
Auge_Ohr
Posts: 1422
Joined: Wed Feb 24, 2010 3:44 pm

Re: SET COLLATION TABLE

#2 Post by Auge_Ohr »

Victorio wrote:But if I want change to USER, error occur :
you need to create you own Collation Table with SetCollationTable()
greetings by OHR
Jimmy

Victorio
Posts: 633
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Re: SET COLLATION TABLE

#3 Post by Victorio »

I created collation table (look example), but in CDX is always "GENERAL", no "USER"
GENERAL is same as USER ?
Attachments
cdxGeneral.gif
cdxGeneral.gif (1.74 KiB) Viewed 22494 times
CollationSK.zip
(77.56 KiB) Downloaded 843 times

User avatar
Auge_Ohr
Posts: 1422
Joined: Wed Feb 24, 2010 3:44 pm

Re: SET COLLATION TABLE

#4 Post by Auge_Ohr »

Victorio wrote:I created collation table (look example),
NO ... you just change 1 Sign which make no Sense. build you own Array with 256 Elements.
Victorio wrote:but in CDX is always "GENERAL", no "USER" GENERAL is same as USER ?
did you erase CDX Index before ?
greetings by OHR
Jimmy

Victorio
Posts: 633
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Re: SET COLLATION TABLE

#5 Post by Victorio »

yes, CDX always erased, when no, then stay previous TAG and new tak appended.

Hmm array I change by example in documentation,I know, that must make complet array.
But now I want know, why still in CDX is text string GENERAL, and if is possible have here "SLOVAK"

I cannot create own CDX, I must use exist CDX from existing and running Visual Foxpro application, I only must connect to its databases with its indexes.

Maybe can append own index TAG wihtout any effect to other applications, do not know, but also need exclusive access, only problem can be with synchronization indexes

User avatar
Auge_Ohr
Posts: 1422
Joined: Wed Feb 24, 2010 3:44 pm

Re: SET COLLATION TABLE

#6 Post by Auge_Ohr »

Victorio wrote:But now I want know, why still in CDX is text string GENERAL, and if is possible have here "SLOVAK"
it doesn't matter if "GENERAL" or "SLOVAK" if your Collation is right on sort.

i recommend to build your own (small) DBF / CDX an "test" if all is ok before try to use "other" DBF / CDX

you must have a active Subscription when using Xbase++ 2.x ... so write a Email to Alaska and include your "Problem"
greetings by OHR
Jimmy

Victorio
Posts: 633
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Re: SET COLLATION TABLE

#7 Post by Victorio »

Ok, Jimmy, thank you for your time.
I bought Xbase 2.0 in january 2015, it is more than 1 year, then I have not active subscription...
Only one thing : if I use REINDEX, my program and also Visual Foxpro worksfine , but then in CDX are two collation tags, one "SLOVAK", second "GENERAL".
Without reindex and with SLOVAK only my program do not work good .

Ok, I must look for subscription, how much is it, because "time is money"

Janko
Posts: 111
Joined: Sat Mar 20, 2010 8:36 am
Location: Cerklje

Re: SET COLLATION TABLE

#8 Post by Janko »

Vitorio,

I've spent a lot of hours producing user defined collation array for slovenian language. My combination is NTX order and ADS server configured to CP 852.

First you have to create 'aCollation' with desired character order and then activate it with following functions.

Code: Select all

	SetCollationTable( COLLAT_USER, aCollation )
	SetCollation( COLLAT_USER )

I can give you also my program (function) for creation of aCollation table (for slovenian order), so you could see the steps neccesary to do creation properly. Program is a 'working version', not edited well, with comments in slovenian language (which Iam sure you could understand), but if you want to look at it (or anyone else), just send me a mail.

Kind regards
JAnko

Victorio
Posts: 633
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Re: SET COLLATION TABLE

#9 Post by Victorio »

Hi Janko,

I will try something with it. But I do not understand, COLLAT_USER will be write to CDX with own TAG ?, and also stay here collatiol SLOVAK with own TAGs ?
And is possible also chage this name to "SLOVAK", or this must include only Alaska Xbase developers ?

It is important for me, because if in *CDX will beone block with collations "SLOVAK" TAGs..., which use other no my software, and also second block with COLLAT_USER, where will be my TAGs.
What happens when some change in database (append record, change record...) with other application in Visual FoxPro?

I must specify, then my application is in read only mode, and VFP application is in read write active mode.

Victorio

Victorio
Posts: 633
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Re: SET COLLATION TABLE

#10 Post by Victorio »

Hi,
Now I found this interesting information :
(http://www.alaska-software.com/scripts/ ... PDRID=3743)

Solution:
Use SET COLLATION TO GERMAN or whatever predefined collation compares
at its best to your user-defined collation table.

Background:
The CDXDBE uses by default Visual FoxPro compatible collation tables,
furthermore the CDXDBE is not able to handle user-defined-collation
tables/sorting by default.

The CDXDBE kowns two different modes which can be setup using
DbeInfo(COMPONENT_ORDER,CDXDBE_MODE,)

1.) CDXDBE_VFOXPRO (Default!)
Supports VFP collation tables only, no user-defined-collation table
support. If user-defined-collation tables are setup the DBE ignores
them and uses MACHINE sorting.

2.) CDXDBE_FOXPRO2X ( CDXDBE_COMIX, CDXDBE_SIX)
Supports Clipper/Fox/Comix/Six and Xbase++ user-defined-collation
tables.


This can be problem, If I set to compatible with Visual Foxpro.....

Post Reply