Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clipper Indexes

Status
Not open for further replies.

CristianD

Programmer
Jan 16, 2002
3
CA
Hello You Clipper Gurus,

I’m not a Clipper programmer, I usually do VB.

Where I work, I’ve been assigned to do a VB program that has to replace a Clipper program, which connects a dBaseIII database, also used by some other Clipper programs.

I’ve started of by linking the dBaseIII tables and their corresponding indexes to a MsAccess database file.

So far so good.

But, after updating some data in the tables, I’ve found that the index files did not update. Big trouble for the other Clipper programs!!!

I've tried to find why, and Microsoft KB’s answer was (Article: Q95044) that .NTX indexes are not supported in MsAccess, only .NDX (dBase indexes).

The same article states that if the Clipper application was developed by using the dBASE .NDX index format, in stead of Clipper’s default .NTX, MsAccess is able to updates the index correctly. Problem solved, but not exactly!

Now, our Clipper programmer doesn’t know how to do that (he’s trying for about a week now), and I was hopping that I can get a helping hand from you guys.

Thanx. Cristian.
 
Assuming you are using Clipper 5.2d or 5.2e, in the NortonGuides on the RDD system, you will find all about using different databasedrivers in Clipper. If using other (older) clipper versions, Good Luck! (No luck, that is)
Be prepared that it is not *really* good practice to use NDX index files, as these are much slower, and less stable then the, not so stable themself, NTX indexes. Better would be to use Foxpro Compound indexes, DBFCDX, but I've not used them (together) with Access or ODBC, so I'm not sure you can even use them. I found these to be most stable and fast, even with large datasets (120+ MB).
Best solution: Rewrite asap, and get rid of the Clipper built program(s). Prepare your new VB app to (be able to) switch to Access/ODBC databases, as you can easily migrate to (some) SQL-server for better performance scaling and stability and support...

HTH
TonHu
 
Thank you TonHu,

But where can I get these "Norton Guides for RDD"?

Thanx again. Cristian.
 
These guides where once what now is known as 'online context sensitive help'. Handily available at the press of a button, made by, the illusive software goeroe 'Peter Norton', (not actually by him I believe), that has fallen into the hands of the great Symantec corp.
All this is just to give a little insight in the past :)
The guides where installed in a dir like \NG on the same drive where you installed \CLIPPER, but it is possible I changed it to that during install, as I allready used NG before. Just search for the fileextension .NG and you should find them (assuming a full install). The 'reader' program is called NG.exe, but that was DOS (and memory- resident), now there are some (freeware) viewers for Windows, you could do a search here for WinGuides or the like.

HTH.
TonHu
 
I have many of the norton guides if you need any. Let me know which versions of Clipper etc you want.
I have used DBFCDX, Comix, SIx and Advantage DBS index drivers sucessfully with Access and ODBC on several networks and workstations. Changing from NDX or NTX you will need to update your clipper code to use the new indexes, and make sure the correct indexes are in focus when throughout your code.
e-mail me at pck@tokleyhiggs.freeserve.co.uk
 
Why Not you use JET insteed of MSACCESS to read DBF . After you can migrate your data in any ODBC supported dbabase.
 
We have the same problem but we found out that there's
a third party product for VB to use such indexes. Maybe
we'll purchase it, anyway it'd be cheaper and faster than
converting all our Clipper programs to VB. Now I can't
remember the name.

Regards

Jalm
 
The name is Apollo OLE DB. It gives support to
DBF/DBT/NTX/FPT/IDX/CDX/NSX/SMT and has more
features.

Jalm.
 
Hi Jalm,

Thanx a lot my friend. I've just been there, that is, and things seem pretty interesting. I'd love to give it a try. If you get your hands on the product, or some demo, or if you know a "way" to get them, please let me know, 'couse it looks that's really what I'm looking for and time is running out in my project.

Cheers, Cristian.
 
You may want to look at a radical alternative. ExtendedSystems.com has a product called Advantage XBase Server. It provides server side database management with Clipper and VB SDKs. A-N-D you get transaction based databases with rollback and server-side filters!

Downside: about $2500 per server.
 
My partner who is the one involved into VB found
an easy trick to take advantage of both languages.
Just invoking the shell to run a clipper application,
which can use the indexes, fills a dbf file or a
txt file then with VB can manipulated it. The process
is as fast as working under DOS (maybe faster than if
working under VB) and is not perceptible for the user.
Try it out, the imagination is the limit.

Jalm
 
I am converting all my clipper programs to Visual Foxpro 6.0
Because I am using NTX index files and I am not able to convert all the programs now (may take a year or so) I want to convert one program at a time. How can I update the .NTX files from foxpro? here is what I am doing.

When I convert a program from clipper to foxpro I create a new .dbf file to add data too: I write the data to the new .dbf file and then i use the windows API to run a clipper compiled update program. The clipper .exe is run from within the foxpro program and simply opens the foxpro .dbf file and the clipper .dbf file with its associated indexes and updates the record(s).

Using a windows API call from within foxpro allows me to make the DOS window invisable so the user is not aware that a DOS Clipper program is being run.

When I finish converting all of the programs I can just recompile all of them deleting the update code for the clipper files .ntx and im done.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top