惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The GitHub Blog
The GitHub Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Y
Y Combinator Blog
B
Blog RSS Feed
K
Kaspersky official blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Know Your Adversary
Know Your Adversary
C
CERT Recently Published Vulnerability Notes
V
Vulnerabilities – Threatpost
C
Check Point Blog
L
LINUX DO - 热门话题
Simon Willison's Weblog
Simon Willison's Weblog
Spread Privacy
Spread Privacy
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
The Hacker News
The Hacker News
P
Palo Alto Networks Blog
L
Lohrmann on Cybersecurity
T
Tor Project blog
T
Tenable Blog
H
Help Net Security
人人都是产品经理
人人都是产品经理
WordPress大学
WordPress大学
Cisco Talos Blog
Cisco Talos Blog
T
Threatpost
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
S
Schneier on Security
G
Google Developers Blog
P
Privacy & Cybersecurity Law Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
小众软件
小众软件
aimingoo的专栏
aimingoo的专栏
Microsoft Azure Blog
Microsoft Azure Blog
Cyberwarzone
Cyberwarzone
Security Latest
Security Latest
AWS News Blog
AWS News Blog
P
Proofpoint News Feed
美团技术团队
博客园 - 三生石上(FineUI控件)
Latest news
Latest news
腾讯CDC
G
GRAHAM CLULEY
阮一峰的网络日志
阮一峰的网络日志
博客园 - 叶小钗
博客园 - 【当耐特】
C
CXSECURITY Database RSS Feed - CXSecurity.com
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
T
Threat Research - Cisco Blogs
T
The Exploit Database - CXSecurity.com
Martin Fowler
Martin Fowler

博客园 - 风中灵药

如何在mvc中共用一个dbconext以节省资源提高性能? asp.net core api路由及多语言切换的实现 mp3转speex的一些研究(貌似不能播放,暂存着) 安装win7 64位和win10 64位双系统小结 macbook装双系统多分区其实很简单,你只要把macbook当作一台普通pc就可以了! 个人对AutoResetEvent和ManualResetEvent的理解 关于WPF下ComBox的SelectionChanged事件 一条语句实现查询各类别前10条记录 【原】Sql2005 实现递归 【转】javascript操作cookies 以及 正确使用cookies的属性 回归: css, bug bug, background-repeat and frames SQL注入中利用XP_cmdshell提权的用法(转) Sql 2005自动备份并自动删除3天前的备份 ActiveX开发心得(原创) 常用正则表达式(包括中文匹配) 使用ASP.NET Global.asax 文件(转) 如何不打开文件 直接出现下载保存提示框 Replace ntext类型中的文字 关于IFRAME 自适应高度的研究[转]
如何用oledb读取dbf(FoxPro表)文件?
风中灵药 · 2012-02-23 · via 博客园 - 风中灵药

2008-09-11 15:31

1.使用VFPOLEDB引擎(推荐)

.net:
OleDbConnection con = new OleDbConnection("Provider=VFPOLEDB.1;Data Source=e:\dbf(包含dbf表的文件夹);Collating Sequence=MACHINE");


sql:
select * from opendatasource('VFPOLEDB.1',
'Data Source=E:\dbf\;Collating Sequence=MACHINE')...[表名(可以加上后缀名]

2.使用Jet引擎

ole_connstring = @"Provider=Microsoft.Jet.OLEDB.4.0;Extended Properties=dBASE IV;Data Source="+FilePath;

但是这种方式可能会报错“外部表不是预期的格式”,这是DBF版本问题,用VFP9的OLEDB即可。

方法A:
进入VFP
USE TT
COPY TO NEWTT TYPE FOX2X
此方法是把表的文件版本转为新的VFP文件版本解决版本问题。

方法B:
升级JET 引擎到SP8,安装MDAC 2.8,到MS的网站去找

1、VFP9的驱动是最新的,各种版本的DBF均可读出;
2、你的连接字串是用JET的引擎,故要升级JET及MDAC;
3、所需文件在MS的网站均有下载。