/// <summary>取得MSSQL錯誤訊息</summary> /// <param name="exception"></param> /// <returns></returns> public static string GetSQLMessage(System.Runtime.InteropServices._Exception exception) { if (exception.InnerException != null) { return(GetSQLMessage(exception.InnerException)); } return("Error"); }
/// <summary>取得MSSQL錯誤訊息</summary> /// <param name="exception"></param> /// <returns></returns> public string GetSQLMessage(System.Runtime.InteropServices._Exception exception) { if (exception.InnerException != null) { return(GetSQLMessage(exception.InnerException)); } else { return(exception.Message); } }