[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Indexing Clipper DBF using VB 4.0

Posted on 1998-07-09
7
Medium Priority
?
325 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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 200 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses

834 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