报错:没有可用的错误消息,结果代码: E_NOINTERFACE(0x80004002)。

解决方案 »

  1.   

    捕捉到 System.Data.OleDb.OleDbException
      Message="没有可用的错误消息,结果代码: E_NOINTERFACE(0x80004002)。"
      Source="System.Data"
      ErrorCode=-2147467262
      StackTrace:
           在 System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
           在 System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
           在 System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
           在 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
           在 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
           在 System.Data.OleDb.OleDbConnection.Open()
           在 Service.ReadNum(String oid, String pass) 位置 d:\Backup\我的文档\Visual Studio 2005\WebSites\Verification\App_Code\Service.cs:行号 117
      

  2.   

    不会是没加名称空间吧
    using System.Data.OledbClient;
      

  3.   

    加了using System.Data.OleDb