Solved

Indexing Clipper DBF using VB 4.0

Posted on 1998-07-09
7
293 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

726 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