最新下载
热门教程
- 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" />
相关文章
- 女神漫画入口首页精品漫画-女神漫画首页入口热作精选 12-15
- 逃离鸭科夫仓库区图纸在哪 仓库区图纸位置详情 12-15
- 逃离鸭科夫零号区图纸在哪 零号区图纸位置详情 12-15
- 巨量百应官网登录入口-官方网址一键直达 12-15
- qq邮箱官网登录入口-qq邮箱官网多设备同步登录入口 12-15
- 光与影33号远征队应急坚壳:应急坚壳符文效果及获取方式详解 12-15