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

后端 未结 4 677
遥遥无期
遥遥无期 2020-12-07 01:45

I am running following code

/*Fetchinch Last CustID from custMaster*/
int ID = 0;
try
{
     con.Open();
     da = new OleDbDataAdapter(\"select max(Id) from         


        
相关标签:
4条回答
  • 2020-12-07 02:19

    I had a similar issue when opening a connection with the following connection string:

    Data Source=.\SQLEXPRESS;Initial Catalog=master;Integrated Security=True
    

    Changing Integrated Security=True to Integrated Security=SSPI in the connection string fixed the problem.

    0 讨论(0)
  • 2020-12-07 02:25

    For a similar problem connecting to a MS Access database, this exact error was generated for a wrong password set in the connection attribute of Jet OLEDB:Database Password=

    0 讨论(0)
  • 2020-12-07 02:29

    I was having same problem but found out to be special characters used in the password.

    So, I changed the Access file password and replaced Jet OLEDB:Database Password= with the updated one and it solved the issue.

    0 讨论(0)
  • 2020-12-07 02:39

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

    Persist Security Info=True;
    

    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
    

    See http://support.microsoft.com/kb/269495 for more information

    0 讨论(0)
提交回复
热议问题