最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
利用RowDeleted事件捕捉SQL错误(c#,vb.net)
时间:2022-06-25 06:04:42 编辑:袖梨 来源:一聚教程网
利用RowDeleted事件捕捉SQL错误(c#)
protected void SqlDataSource1_Deleted(object sender, SqlDataSourceStatusEventArgs e)
{
if (e.Exception != null)
{
this.lblErrorMessage.Text = e.Exception.Message;
e.ExceptionHandled = true;
}
}
Untitled Page
File: Web.config
connectionString="Data Source=localhostSQLEXPRESS;Initial Catalog=Northwind;Integrated Security=True"
providerName="System.Data.SqlClient" />
vb.net版
http://www.w***3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Protected Sub SqlDataSource1_Deleted(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceStatusEventArgs)
If (e.Exception IsNot Nothing) Then
Me.lblErrorMessage.Text = e.Exception.Message
e.ExceptionHandled = True
End If
End Sub
https://www.111cn.net /1999/xhtml" >
Untitled Page
File: Web.config
connectionString="Data Source=localhostSQLEXPRESS;Initial Catalog=Northwind;Integrated Security=True"
providerName="System.Data.SqlClient" />
相关文章
- 地狱即我们无人机怎么升级 模块安装与技能解锁指南 09-18
- 无主之地4圣城终点区玉米卷饼在哪 圣城终点区玉米卷饼收集攻略 09-18
- 禁闭求生2蝴蝶头箍怎么做 蝴蝶头箍制作攻略 09-18
- 我的休闲时光1月优家风尚新衣服有哪些-1月优家风尚新增服饰一览 09-18
- DNF手游女圣职怎么一天50级-女圣职一天50级速成攻略 09-18
- 魔兽世界莫高雷怎么去雷霆崖-莫高雷前往雷霆崖方法 09-18