System.Data.OleDb.OleDbException: IErrorInfo.GetDescription 因 E_FAIL(0x80004005) 而失败。 at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(Int32 hr) at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.OleDb.OleDbCommand.ExecuteReader() 用C#作一个小程序,使用了一条简单的子查询语句,结果出现这个错误 弄得我调试了半天,该语句在ACCESS里面运行正常 最后的解决方法 把所有的表名和字段名统统加上 [] 方括号包含起来 不明白为什么?! 这个错误好像MSDN里面也没有什么描述 325 字体:大 中 小 |