System.Data.OleDb.OleDbException: 标准表达式中数据类型不匹配。
相关代码如下,出现:System.Data.OleDb.OleDbException:标准表达式中数据类型不匹配。错误。。请大家看看:protectedvoidIbtbm...
相关代码如下,出现:System.Data.OleDb.OleDbException: 标准表达式中数据类型不匹配。错误。。请大家看看:
protected void Ibtbm_Click(object sender, ImageClickEventArgs e)//报名
{
String rederSql = "select * from pxbmtable where UserUid='" + Session["useruid"].ToString() + "' and pxid=" + pxid() + " and pxtime='" + kkkssj.InnerText + "'";
if (DBconn.Dr(rederSql).Read())//如果存在相同用户名
{
Response.Write("<script>alert('您好,您已经报过该培训课程,请点确定选报其他课程!');window.location.href='zqpx.aspx';</script>");
DBconn.Dr(rederSql).Close();
}
else
{
string StrSql = "insert into pxbmtable(UserUid,pxid,pxname,pxtype,pxtime,hytype)values('" + Session["useruid"].ToString() + "'," + pxid() + ",'" + kctitle.InnerText + "','" + pxtype.InnerText + "','" + kkkssj.InnerText + "'," + Session["usertype"] + ")";
DBconn.Dsql(StrSql);
string strupdate = "update pxtable set ybmrs=ybmrs+1 where id=" + pxid() + "";
DBconn.Dsql(strupdate);
Response.Write("<script language='javascript'>alert('报名成功!');location.href='zqpx.aspx';</script>");
}
} 展开
protected void Ibtbm_Click(object sender, ImageClickEventArgs e)//报名
{
String rederSql = "select * from pxbmtable where UserUid='" + Session["useruid"].ToString() + "' and pxid=" + pxid() + " and pxtime='" + kkkssj.InnerText + "'";
if (DBconn.Dr(rederSql).Read())//如果存在相同用户名
{
Response.Write("<script>alert('您好,您已经报过该培训课程,请点确定选报其他课程!');window.location.href='zqpx.aspx';</script>");
DBconn.Dr(rederSql).Close();
}
else
{
string StrSql = "insert into pxbmtable(UserUid,pxid,pxname,pxtype,pxtime,hytype)values('" + Session["useruid"].ToString() + "'," + pxid() + ",'" + kctitle.InnerText + "','" + pxtype.InnerText + "','" + kkkssj.InnerText + "'," + Session["usertype"] + ")";
DBconn.Dsql(StrSql);
string strupdate = "update pxtable set ybmrs=ybmrs+1 where id=" + pxid() + "";
DBconn.Dsql(strupdate);
Response.Write("<script language='javascript'>alert('报名成功!');location.href='zqpx.aspx';</script>");
}
} 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询