在 C# 3.5 中生成 dBase II DBF 文件
我正在生成 dbf 文件以导入到仅接受 dBase II 或 III 的旧系统。我的应用程序是.Net 3.5。我最初开始使用这个组件 VFPOLEDB.1,但它只生成 dBase V 格式的 dbf 文件,该格式不向后兼容。
任何人都知道在 dBase II 或 III 中生成 de dbf 文件的组件或驱动程序
谢谢
I'm generating dbf file to get imported to legacy systems that only accepts dBase II OR III. My aplication is .Net 3.5. I initially started working with this component VFPOLEDB.1 but it only generate dbf files in dBase V format which isn't backwards compatibily.
Anyone knows a component or driver to generate de dbf file in dBase II or III
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
尝试发出调用来执行打开文件的脚本,然后执行
COPY TO {some file} type FOX2X
这应该会得到输出...
还有另一篇类似的文章,所有内容都是通过 VFPOleDB 通过 C# 完成的,我'我会尝试找到它...是的,感谢 @DaveB,这里是他在 Create .DBF in C# code that url 中的帖子片段来自 Excel(VFP 或非 VFP)
最初的帖子是为了让某人能够以 Excel 格式打开文件。
Try issuing a call to execute a script that opens the file, then does
COPY TO {some file} type FOX2X
that should get you the output...
There was another post of a similar all being done via C# through the VFPOleDB and I'll try to find it... Yup, and with credit to @DaveB here's a snippet of his post in Create .DBF in C# code that is readable from Excel (VFP or not)
The original post was for someone to be able to open the file in Excel format.
我记得几年前就尝试过做这件事,但失败了。我的解决方案是采用现有的 dBase II 文件,清空所有数据,并保留该空文件作为我需要创建新数据库时的模板。
I remember trying to do this very thing several years ago and failing. My solution was to take an existing dBase II file, empty all data, and keep that empty file as a template for when I needed to create a new database.
ESRI 的 Shapefile 格式使用 dBase III 来存储属性数据。 SharpMap 项目中有一个不错的实现,您应该能够独立使用它(不过要注意许可证:它是 LGPL)。
http://code.google .com/p/sharpmapv2/source/browse/trunk/SharpMap.Data.Providers/ShapeFileProvider/DbaseFile.cs
ESRI's Shapefile format uses dBase III for storing attribute data. There's a decent implementation in the SharpMap project which you should be able to use independently (careful of the license, though: it's LGPL).
http://code.google.com/p/sharpmapv2/source/browse/trunk/SharpMap.Data.Providers/ShapeFileProvider/DbaseFile.cs