?
Solved

Indexing Clipper DBF using VB 4.0

Posted on 1998-07-09
7
Medium Priority
?
315 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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

Independent Software Vendors: 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!

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

777 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