ADO Description 屬性
定義和用法
Description 屬性可返回一個字符串,該字符串包含對錯誤的描述。
這是 Error 對象的默認(rèn)屬性。提供者和 ADO 均可成為錯誤源。
提供者負(fù)責(zé)向 ADO 傳遞特定的錯誤文本。對于接收到的每一個提供者錯誤或警告,ADO 都會向 Errors 集合中添加一個 Error 對象。枚舉 Errors 集合以跟蹤提供者傳遞的錯誤。
語法
strErrorText=objErr.Description
實例
<% for each objErr in objConn.Errors response.write("<p>") response.write("Description: ") response.write(objErr.Description & "<br />") response.write("Help context: ") response.write(objErr.HelpContext & "<br />") response.write("Help file: ") response.write(objErr.HelpFile & "<br />") response.write("Native error: ") response.write(objErr.NativeError & "<br />") response.write("Error number: ") response.write(objErr.Number & "<br />") response.write("Error source: ") response.write(objErr.Source & "<br />") response.write("SQL state: ") response.write(objErr.SQLState & "<br />") response.write("</p>") next %>