INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Recreating .NTX outside of Clipper

Recreating .NTX outside of Clipper

(OP)
I have an old app probably based on Clipper (it creates *.dbf and *.ntx files). Sometimes the .ntx files seem to be corrupted and my app won't run.
I don't have Clipper so I cannot re-index the *dbf files. Is there any possibility to recreate the *.ntx files from the *.dbf's by using an external program, i.e. VB code?
Roel

RE: Recreating .NTX outside of Clipper

Most apps would have a routine in them somewhere to 'Pack and Reindex' - usually in a utilities menu, or perhaps from a commend line.

Are all the files that need to be indexed in a single folder? If so, and assuming that there are no UDFs or similar in the index keys, it would not be difficult to create a simple routine to do a pack and reindex for you.

Martin

Regards

Griff
Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

RE: Recreating .NTX outside of Clipper

(OP)
Thank you. It is a very simple general ledger program and it does not have a "Pack and Reindex"-option. Now that you mention "Pack", it seems that the problems with *NTX happen after packing. The app uses 5 *.DBF files, each having just one *.NTX, all in the same directory.

RE: Recreating .NTX outside of Clipper

can you zip them and send them to me?
 

Regards

Griff
Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

RE: Recreating .NTX outside of Clipper

(OP)
Unfortunately I cannot post the most relevant files on this public forum. In the meantime I found a secret command in my app, which can do a few system tasks, re-indexing a.o.
Still, I would be interested in some generic VBA-code that would make an NTX-file from a given DBF. We would like to do some batch pre-processing outside of the app. We would be able to generate the correct DBF after pre-processing, but not the accompanying NTX and the app won't run without it.
I know B+Tree is complicated and I hesitate trying to write such a program myself. A few hints might help a lot.
Thank you for your kind help.

RE: Recreating .NTX outside of Clipper

If you could send me the ntx files, I could help.
I would happily look at them and write an exe that would make new ones, foc.

Without a bit of data and the ntx files I cannot help.

Good luck

Regards

Griff
Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

RE: Recreating .NTX outside of Clipper

On refection, if you opened a COPY of each of the index files in Notepad - you could see the index key in the first 400 characters or so.

If you then posted that information here, with the name of the data table, and the name of the index file, I could easily write an index building file for you. Assuming there are no UDFs in the keys.

Like this:
ACCOUNT.DBF  ACCOUNT1.NTX  ACCOUNT_NO
INVOICE.DBF  INVOICE1.NTX  INVOICE_NO
...

You could then download that from my web site.


 

Regards

Griff
Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

RE: Recreating .NTX outside of Clipper

One other thought, why not get one of the DBU style utilities from here:

http://www.the-oasis.net/ftpmaster.php3?content=ftputils.htm

They will enable you to browse your dbf files and create new indexes.

Regards

Griff
Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

RE: Recreating .NTX outside of Clipper

One additional thought, the DBF file sizes may be an issue.   What's the file sizes, and how many records does the largest file contain.  When my routines recreate an existing NTX file, I erase the old index file first.  If there is corruption in the header, just reindexing will only propogate the corruption.

Griff has you on the right track, DBU will allow you to define the index structure, and also allow you to recreate the indexes.   As long as the data size or a corrupt file DBF or NTX, you should be OK.

Bu tif the Reindex Pack function diesn't make it better, you probably have another issue to deal with before you're done.

Jim C.
 

RE: Recreating .NTX outside of Clipper

(OP)
I'm really grateful for the fine support I get here. Right now I'm OK as someone in another forum hinted me to a hidden system command in my app that I didn't know of. This command will do a re-index and re-totalize.

Thanks also for the DBU-link. Not having Clipper myself I'm still in doubt whether I could have used it. I came here because I thought there would probably exist ample VBA-snippets for indexing a DBF. In my naivity I had probably underestimated this task. Thanks for the education!

Roel

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close