How to get detailed ExecuteNonQuery error message?
问题 I'm working on my first ever assignment in ASP.NET. It's a website and I work in Visual Studio. What I can't figure out is how to get a detailed error message to be displayed when ExecuteNonQuery fails. I'm using OleDb connection, so my guess is I have to use OleDbException or OleDbError to get a detailed error message. Basically, the question is - how do I update this code to have a detailed error message IF ExecuteNonQuery fails? string v1 = Request["v1"]; string v2 = Request["v2"]; sql2 =