Browsing database with VFP CDX index - cannot move at rows

This forum is for eXpress++ general support.
Message
Author
Victorio
Posts: 633
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Browsing database with VFP CDX index - cannot move at rows

#1 Post by Victorio »

Hi,

I still work on this...
Now here is example, where I opening Visual Foxpro database , database was indexed by VFP 9.
In example is many variands, which did tryed.
After start open browse and you can see, cannot listing in table, but interesting is, if I moving with side scroll bar , after some move change content of table, after severeal blocks of records.
This looks some problem with softtrack or ? I do not know what.

If somebody can little time to look for this... Thanks

in attach is also database.

In DBF was used also function LAT_IBM, which converting national characters to ascii, but in example was changed for empty function. Also here is LAT_IBMSTP, this can change name to LAT_IBM.

In tested order I test index keys without this function
Attachments
DBFIndexy.zip
(5.78 MiB) Downloaded 723 times

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Browsing database with VFP CDX index - cannot move at ro

#2 Post by rdonnay »

When I indexed on Upper() everything seems to work ok.

Code: Select all

SELECT 1
use vl800490vfp index vl800490vfp EXCLUSIVE ALIAS 'VLASTNIK'
INDEX ON Upper(Left(vla,30)) TAG 'VLW'

set charset to ANSI

set collation to ascii

VLASTNIK->(OrdSetFocus('VLW'))
The eXpress train is coming - and it has more cars.

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

Re: Browsing database with VFP CDX index - cannot move at ro

#3 Post by Victorio »

Yes, if index was created with Xbase , then ok,
also when do REINDEX with exist CDX from VFP., then ok

but when I use CDX file from VFP without change, then do not work. Because I attached original dbf and cdx from VFP application.

after reindex works xbase and problem has VFP applicaton... :think:

So I forget examine use database after REINDEX in VFP application, with DBESYS as in my example, if some change.

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Browsing database with VFP CDX index - cannot move at ro

#4 Post by rdonnay »

after reindex works xbase and problem has VFP applicaton... :think:
Have you tried indexing on Upper() in the VFP application?
The eXpress train is coming - and it has more cars.

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

Re: Browsing database with VFP CDX index - cannot move at ro

#5 Post by Auge_Ohr »

Victorio wrote:in attach is also database.
i can't open vl800490VFP.dbf with its CDX
Index_UDF.jpg
Index_UDF.jpg (26.53 KiB) Viewed 17456 times
it does contain UDF LAT_IBM_U() ... :naughty:

your DBESYS.PRG is still wrong for Visual FoxPro DBF
look again at FOXDBE (DATA-Komponente)
// Note : .F.
DbeInfo( COMPONENT_DATA, FOXDBE_CREATE_2X, .F. )
DbeInfo( COMPONENT_DATA, FOXDBE_LOCKMODE , FOXDFBE_LOCKMODE_VISUAL )
btw. do not use too much DBE in Demo Sample ... add more later when it works so far ...

i have used "Advantage Data Architect"*** to open DBF and create new Index.
Fox_Uni.jpg
Fox_Uni.jpg (78.34 KiB) Viewed 17456 times
as you can see i wrote

Code: Select all

LEFT(VLA,30)
but Info say Key Length are 60 ... hm ... :think:

have a look at ZIP Attachment with new CDX if order is right.
VFP_CDX.zip
(134.57 KiB) Downloaded 772 times

*** http://devzone.advantagedatabase.com/dz ... Platform=6
greetings by OHR
Jimmy

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

Re: Browsing database with VFP CDX index - cannot move at ro

#6 Post by Victorio »

Hi,

I will look for this.Thanks
Jimmy: about LAT_IBM_U, is 2 version that I use LAT_IBM for CP852 and LAT_IBM_U for Win1250.

But in original CDX from VFP application is LAT_IBM, and in VFP source is used SYS(15) foxpro function which used EUROASCII.MEM table.
I have my own LAT_IBM.

It is not important for "scrolling" problem, this is also with order LEFT(VLA,30)...

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

Re: Browsing database with VFP CDX index - cannot move at ro

#7 Post by Victorio »

Hi,

I found some track, where problem can be :think:
With Advantage data architect really can view some problem with key lengt.
For example key LEFT(VLA,30) show as key length 60 .
After reindex in VFP this length was repaired to 30, and browsing work.

This look to no problem in Alaska Xbase compatibility , but some probpem with generating CDX in VFP application.
True is, that this VFP app works without any problem... :think:

I looked more CDX files, and all have in CDX for Character field key length 60 . This can be problem, if reading CDX (mixing data).

Now I must test, if VFP application create correct CDX after delete CDX, or still bad...

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Browsing database with VFP CDX index - cannot move at ro

#8 Post by rdonnay »

You may want to try changing Left(VLA,30) to SubStr(VLA,1,30).

That may help with FoxPro.
Possibly it may not support the Left() function.
The eXpress train is coming - and it has more cars.

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

Re: Browsing database with VFP CDX index - cannot move at ro

#9 Post by Victorio »

Hi Roger,

I found some another track, application in VFP used EUROASCII.MEM file, where are variables array for collation.
I mean it can be a reason, why show index key length for LEFT(VLA,30) 60 and not 30 :?:
If every character is in CDX stored as 2 characters....
I must analyse it, whether this is the reason.

Everything revolves around collation and national characters... ;)

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

Re: Browsing database with VFP CDX index - cannot move at ro

#10 Post by Victorio »

Hi Jimmy:

About index key length I found this :
https://technet.microsoft.com/de-de/sys ... s/aa975951

where is written :
For certain collating sequences, or when using double-byte character sets (DBCS) characters, each character in the eExpression parameter in the INDEX command uses two characters in the index key. In these cases, the length of eExpression is limited to 120 characters.

this can be situation, where key length is 30 chars but with use SET COLLATE TO SLOVAK used 60 chars. :think:

also found in other source "if collate set to Machine, every character uses 1 byte, if no MACHINE (used some other Collation), then use 2 bytes.

Now I see, it is not problem in CDX from VFP application, but I mean only problem with missing national localisation (SET COLLATE TO SLOVAK is not implemented in Xbase++, so Slovakia is small country ;) but NOW ! chaired by the European Commission :clap:

Post Reply