使用.IDX文件中的DBF文件搜索 [英] Search in DBF file using .idx file

查看:188
本文介绍了使用.IDX文件中的DBF文件搜索的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个DBF文件,一个索引文件。 我想读索引文件和搜索记录满足一定的条件。 (例如:搜索记录它的StudentName以A使用Student.DBF和StudentName.idx)

I have a DBF file and a index file. I want to read index file and search records satisfy some condition. (for example: search records which its StudentName begin with "A" by using Student.DBF and StudentName.idx)

我如何做到这一点编程?

How do I do this programmatically?

推荐答案

我没有在code从我的头顶,但如果你不希望使用ODBC,那么你应该看看阅读ESRI形状文件,它们是由3部分(或以上)一个.dbf(你在找什么),PRJ文件和.SHP文件。这可能需要一些工作,但你应该能够挖掘出code。你应该看看 SharpMap的在codePLEX。这不是一个简单的任务来读取DBF W / O ODBC,但它可以做到的,而且有很多的code在那里这样做。你必须处理大端VS小尾数价值观,以及一系列文件版本也是如此。

I dont have the code off the top of my head, but if you do not want to use ODBC, then you should look into reading ESRI shape files, they consist of 3 parts (or more) a .DBF (what you are looking for), a PRJ file and a .SHP file. It could take some work, but you should be able to dig out the code. You should take a look at Sharpmap on codeplex. It's not a simple task to read a dbf w/o ODBC but it can be done, and there is a lot of code out there for doing this. You have to deal with big-endian vs little-endian values, and a range of file versions as well.

如果你去这里你会发现code读取DBF文件。具体地讲,你会感兴趣的公共无效ReadAttributes(流流)方法。

if you go here you will find code to read a dbf file. specifically, you would be interested in the public void ReadAttributes( Stream stream ) method.

这篇关于使用.IDX文件中的DBF文件搜索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆