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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dbf files made in clipper

Status
Not open for further replies.

fluppeke

Programmer
Aug 30, 2006
38
BE
Hello Experts,

Another question,

In serveral firms I work the program cubic for dos is used.
This is a bookkeeping program.
It is made in clipper.
So far no problem.
In my program I use this tables.
Tables are made in dbase IV(or dbase III) with ntx index files.
Is there any way to use this indexes (thru odbc or ... ??)
so I can make a select that is much more faster than copying the file in a cursor and place an index on it
What I really wish to do is to find a record in the most fasted way.
Any suggestions ?

WFG,

Filip
 
Hi Filip,

Most fast (as far as my knowledge goes) is using normal VFP-index with Rushmore. Gives fastest search.
Also SQL views do use Rushmore.

KR
-Bart

 
Ok Mike,

That is what I just do. But it is very slow, because I can't use the indexes (ntx files), so the question is : ca i use the ntx files(as in an index) in a seek phrase ?, and how can i know which ntx i have to use ?

wvg,

Filip
 
Filip,

As far as my knowledge goes you can't use the Clipper (.NTX) index files.
Instead you should create new indexes based upon the Clipper index-files.
If you are interested, I believe to have somewhere the docu telling how the index-key is stored in the header. So You than should be able to retrieve that programmaticly and build VFP index.

KR
-Batr
 
Dear KR,

I would very much find that information you suggested,

wfg,

Filip
 
Filip,

Bart is right that you need to create new indexes. However, don't try to hack the file header to find out what indexes to create. Instead, just create the indexes you need to run your queries.

Basically, the indexes should match the WHERE or FOR clauses in your code. For example, if you have a command like this:

SELECT * FROM Customers WHERE UPPER(Cust_ID) = "ALFKI"

then you need an index on UPPER(Cust_ID).

If you do:

LOCATE FOR ID > 100

then you need an index on ID. And so on.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
The clipper code used to be "Use <dbf> index <index1>, <index2> etc"

Whether that will work in fox I don't know
 
I think I still have a copy of dbu.exe which should be able to give you the key to each index.

Although I tend to agree with mike just use the table and make an appropriate index. Can you get exclusive use easily. If not you will have to make external indexes & I don't know what effect that has on optimisation.

Ps Bertie is my dog I am Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top