执行Select命令时OleDbDataAdapter错误 [英] OleDbDataAdapter error while executing Select command
本文介绍了执行Select命令时OleDbDataAdapter错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
以下代码给出了这个错误;
OleDbDataAdapter内部错误:无效的行集访问器:Ordinal = 15状态= UNSUPPORTEDCONVERSION。
之后从表中删除图像字段它很好用。如何从表中检索图像?
我正在使用Sql CE 3
Following code gives this error;
OleDbDataAdapter internal error: invalid row set accessor: Ordinal=15 Status=UNSUPPORTEDCONVERSION.
After removing Image field from table it works good. How can i retrieve image from table?
I'm using Sql CE 3
vcon = new OleDbConnection(@"Provider=Microsoft.SQLSERVER.CE.OLEDB.3.5;Data Source=" + Controller.DBPath);
public DataTable GetReporters()
{
vcon.Open();
using (DataTable table = new DataTable())
{
using (OleDbDataAdapter da = new OleDbDataAdapter(Select * from Reporters, vcon))
{
da.Fill(table);
}
vcon.Close();
return table;
}
}
推荐答案
将列类型转换为nvarchar(max或varchar(max)或varbinary(max) )而不是。
Convert column type to nvarchar(max or varchar(max)or varbinary(max) instead.
这篇关于执行Select命令时OleDbDataAdapter错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文