多步OLE DB操作产生错误。检查每个OLE DB状态值,如果可用。没有工作已完成 [英] Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done

查看:1056
本文介绍了多步OLE DB操作产生错误。检查每个OLE DB状态值,如果可用。没有工作已完成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在下面code

/*Fetchinch Last CustID from custMaster*/
int ID=0;
try
{
     con.Open();
     da = new OleDbDataAdapter("select max(Id) from custMaster",con);
     DataSet ds = new DataSet();
     da.Fill(ds);
     for(int i=0;i<ds.Tables[0].Rows.Count;i++)
     ID=int.Parse(ds.Tables[0].Rows[i][0].ToString());
     con.Close();
}
catch (Exception ex) {}
finally 
{
     con.Close();
}

我把调试器,try块的第一个语句,并发现当我试图打开连接的错误正在添加。 错误文本:

I am putting debugger from the first statement of try block and finding that error is comming when i am trying to open the connection. Error Text:

Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.

连接字符串是:

Connection String is:

供应商= Microsoft.Jet.OLEDB.4.0;数据源= E:\力新\数据库\ TestApp.accdb;集成   安全性= SSPI

"Provider=Microsoft.Jet.OLEDB.4.0;DataSource=E:\NewSoft\Database\TestApp.accdb;Integrated Security=SSPI"

我使用OLEDB连接。

I am using oledb connections.

推荐答案

这可以在连接字符串错误的结果。你应该尝试添加

This can be the result of the error in your connection string. You should try to add

Persist Security Info=True;

或者你可能在你的OLE DB提供程序,其中必须有OLEDB_SERVICES记录你的注册表问题。在根据HKEY_CLASSES_ROOT \ CLSID注册表,查找OLE DB提供程序的CLSID,并添加下面的注册表值:

Or you might have problems in your registry with your OLE DB provider, which must have OLEDB_SERVICES record. In the registry under HKEY_CLASSES_ROOT\CLSID, find the CLSID of the OLE DB provider and add the following registry value:

Value Name: OLEDB_SERVICES
Data Type: REG_DWORD
Value: 0xFFFFFFFF

请参阅 http://support.microsoft.com/kb/269495 了解更多信息

这篇关于多步OLE DB操作产生错误。检查每个OLE DB状态值,如果可用。没有工作已完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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