错误:外部表未处于预期格式 [英] Error : External Table is not in Expected Format

查看:65
本文介绍了错误:外部表未处于预期格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将.dbf表的数据放入数据集或数据表中以在Gridview中查看它,

但是我收到了错误。

请帮助我...



提前致谢

 OleDbConnection c =  new  OleDbConnection(  Provider = Microsoft.Jet.OLEDB.4.0; Data Source = E:\\ \\\Folder;扩展属性= dBASE IV;); 
c.open();
OleDbDataAdapter da = new OleDbDataAdapter( 选择*来自表11,c);
DataSet ds = new Dataset();
da.Fill(ds);
c.Close();

解决方案

阅读这些:

将DBF加载到DataTable中 [ ^ ]



将DBF文件导入C# [ ^ ]



https://fastdbf.codeplex.com/ [ ^ ]


当您尝试使用带有以下连接字符串的Excel 2007文件时,会发生此错误: Microsoft.Jet.OLEDB .4.0 扩展属性= Exc el 8.0

请按照以下步骤操作:

步骤:

1)单击文件菜单。

2)点击另存为。

3)显示一个方框。

4)更改文件名称&另存为类型到Excel 97-2003工作簿(* .xls)&点击保存然后就可以了。





希望它有所帮助!

- Amit

I am Trying to get .dbf table''s data into Dataset Or Datatable to View it in Gridview,
but i am getting above error.
please help me...

Thanks in advance

OleDbConnection c= new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\\Folder; Extended Properties=dBASE IV;");
c.open();
OleDbDataAdapter da=new OleDbDataAdapter("Select * from Table11",c);
DataSet ds=new Dataset();
da.Fill(ds);
c.Close();

解决方案

Read these :
Load a DBF into a DataTable[^]

Importing a DBF file into C#[^]

https://fastdbf.codeplex.com/[^]


This error occurs when you are trying to use an Excel 2007 file with a connection string that uses: Microsoft.Jet.OLEDB.4.0 and Extended Properties=Excel 8.0.
Follow the steps below:

Steps:

1) Click on File Menu.
2) Click on Save As.
3) Show a Box.
4) Change File Name & Save As Type to Excel 97-2003 Workbook (*.xls) & click save then it work.



Hope it helps!

--Amit


这篇关于错误:外部表未处于预期格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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