Solved

Indexing Clipper DBF using VB 4.0

Posted on 1998-07-09
7
279 Views
Last Modified: 2010-05-03
I want to re-index clipper dbfiles ( NTX ) using visual basic 4.0.  Can anyone provide a routine or source code to do this?
0
Comment
Question by:nangina
  • 4
  • 2
7 Comments
 

Author Comment

by:nangina
ID: 1465403
Edited text of question
0
 

Author Comment

by:nangina
ID: 1465404
Code necessary!
0
 
LVL 9

Expert Comment

by:cymbolic
ID: 1465405
It's a hairball for your own code, and you know, once you write your own routine, you will be held responsible for all those indexing problems that occur anyway, then blamed for failures in other programs that use 'em!  Here's the route to go.  Get the Codebase package from Sequiter Software.  It provides a library for using xbase/clipper files and indexes, as well as all uses of your database files, including packing.  I've used it for years in conjunction with Clipper itself, and it supports the .NTX as well as other index formats.  Your user won't know that you didn't write the routines yourself, and it will be a much superior soution to anything hacked together in basic code.
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

Author Comment

by:nangina
ID: 1465406
Are there other options that are possible if I avoid this method?
Shipping time, learning time, etc are a factor.
0
 
LVL 9

Accepted Solution

by:
cymbolic earned 100 total points
ID: 1465407
I know of no code available in basic (or any other language) that handles clipper indexing.  The .ntx format is not one of the most popular (.ndx from dbase probably holds that distinction).  I have written code that reads through a clipper .ntx in basic, and I understand in detail how the indexing files are formatted and used, but the coding that would allow you to actually create and modify what is basically a custom b-tree based indexing scheme would be very difficult to get right, particularly if you ever expected Clipper itself to use the index.  Then there is the locking scheme that Clipper uses on the index files.  This I have never been able to discover, although I've looked extensively for it.  If you are interested, I can send you some code to read through the index files written in QB4.5, that could easily be upgraded to VB, since it only uses udfs and binary file I/O.  

If you ever do come across code to do .ntx indexing, please let me know at cymbolic@aol.com.  Although I'm not heavily into Clipper currently, I do have a set of Shareware utilities out therecalled DBFLOOK, that I still take care of.

Your best bet still is to get the library.  Working out the incompatibilities between any thing you build and Clipper indexes would take you much longer that getting and using the library from Sequiter Software.

You might be able to come across one of those disenfranchised Clipper developers that left when Nantucket was taken over by CA-Associates, but all there work was in c, which is what Sequiter libraries are built with.
0
 

Author Comment

by:nangina
ID: 1465408
I would be interested in getting the code for QB 4.5. I guess I have no other option but to use the libraries.  Can I use Codebase to read a dbf file that contains the index strings, and then use these strings to re-index the database files? This is of utmost importance since, the index strings use clipper functions like DBLOWER, so the index is based on the result of this function e.g. "DBLOWER(Code+Company)".  Can codebase handle such an index?
0
 

Expert Comment

by:ismailkhan
ID: 1465409
It is possible to link (attach) Clipper .dbf files to a Microsoft Access
database. To do so, link it as a dBASE IV file. Note, however, the index
may or may not be updatable.
 
Clipper provides an alternative indexing method (.ntx) to the dBASE
standard (.ndx). The Clipper index format is not recognized by Microsoft
Access; therefore, Microsoft Access cannot update it correctly.
 
However, if the Clipper application was developed using the dBASE .ndx
format, Microsoft Access updates the index correctly.


0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now