FOXCDX and integer

Xbase++ 2.0 Build 554 or later
Message
Author
messaoudlazhar
Posts: 42
Joined: Mon Dec 23, 2013 2:10 pm
Contact:

Re: FOXCDX and integer

#11 Post by messaoudlazhar »

Hi,

Your index file is faulty (poorly tagged it), you must completely rebuild (erase and indexing new) is a defect in dtabaseEngine CDXDBF (reindexing or creating file without deletion does not correct this problem) so you have crush before reconstituting it.

After reconstitution it'll work the way you want.

Messaoud Mohamed Lazhar

skiman
Posts: 1185
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: FOXCDX and integer

#12 Post by skiman »

Hi Pedro,

Thanks for your test, but this isn't the problem. When you create the index with Xbase++, it will work.

However, I have to read the existing index from another application which is created with Visual Foxpro. In the DBF the fieldtype is an INTEGER with a lenght of 4. In Xbase this is converted to a Numeric and a search isn't working. I can create a new index, but this isn't updated when the other application adds something to the database. I want to check that database every 5 seconds to update my tables. I can't create a new indexfile every 5 seconds.
Best regards,

Chris.
www.aboservice.be

skiman
Posts: 1185
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: FOXCDX and integer

#13 Post by skiman »

Hi Messouad,

Thanks for your answer. I will ask if they have an option to recreate the indexfile from nil in that application.
Best regards,

Chris.
www.aboservice.be

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

Re: FOXCDX and integer

#14 Post by rdonnay »

Can you send the database to me?

I would like to experiment with it.
The eXpress train is coming - and it has more cars.

skiman
Posts: 1185
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: FOXCDX and integer

#15 Post by skiman »

Hi Roger,

See the second post in this thread. I added the code I used for testing in xdbu and the DBF and CDX.
Best regards,

Chris.
www.aboservice.be

skiman
Posts: 1185
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: FOXCDX and integer

#16 Post by skiman »

Hi Messouad,

I asked to do a reindexing via the application. The result remains the same. I don't know if that application is creating a new indexfile or just executes a reindex.
Best regards,

Chris.
www.aboservice.be

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

Re: FOXCDX and integer

#17 Post by rdonnay »

Chris -

I think I may have found something that works.

dbSeek( <number>, .t. ) always puts me on the correct record.
dbSeek( <number>, .f. ) always puts me at EOF.

BTW - I think there is something wrong with the index. I also tried opening the file with ADSDBE. It is supposed to be very FoxPro friendly, yet it errors on a dbSkip() when using the ARTCODE index.

Roger
The eXpress train is coming - and it has more cars.

messaoudlazhar
Posts: 42
Joined: Mon Dec 23, 2013 2:10 pm
Contact:

Re: FOXCDX and integer

#18 Post by messaoudlazhar »

Hi,

if you only make re-indexing the file, the problem persists. You must recreate it again (erase the file and indexing)

_________________
Best regards,

Messaoud Mohamed Lazhar

skiman
Posts: 1185
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: FOXCDX and integer

#19 Post by skiman »

Hi,

Since I can't trust the index created by the other application, I create one myself. If I get an EOF() after a seek, it means that there is new data added. At that moment I recreate the index.
Best regards,

Chris.
www.aboservice.be

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

Re: FOXCDX and integer

#20 Post by rdonnay »

Chris -

Did you try my recommendation? - dbSeek( <n>, .t. )
The eXpress train is coming - and it has more cars.

Post Reply