Click here to Skip to main content
15,942,756 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using the C# dotnetdbf code (from github) to create, write and read dbf files.
It's great, except I cannot figure out how to create an index.

What I have tried:

There is a DBFField class which I use to set the field details (name, type, length) when I create a DBF. DBFField also has a 'byte indexFieldFlag' parameter which I tried setting to various values: 255 and 1 so far. But that does not seem make the field an index.

I think an indexed DBF field needs a .ntx file to define it.

Does anyone know how to create this please? I've looked through the dtnetdbf code and even though it looks like I can set an index field, it does not create a .ntx file.
Posted
Updated 2-Mar-23 11:51am
v3
Comments
Richard Deeming 2-Mar-23 4:10am    
Why not ask on the GitHub project? The authors of the project are the most likely people to be able to help you with their code.
Jackie Lloyd 2-Mar-23 4:26am    
Thank you for the suggestion, I couldn't see a way to do that, but now see that I can add this as an issue - thanks for making me look again!

1 solution

Could not find any C# code, but you could have a look at:
TDBF, your free, open source, Delphi database engine! | Jon L. Aasenden[^]
It supports DBase indexes and can be used with the free Lazarus IDE, see:
Lazarus Tdbf Tutorial - Lazarus wiki[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900