a.aspx?sn=636E7168-3EE8-440D-A5C9-F02760F2527D
代码:
string sn = this.Request.QueryString["sn"].ToString();
string sql = "select * from KO_SignOn where CheckID="+sn;
int a =Convert.ToInt32(SqlHelper.ExecuteScalar(SqlHelper.connectionString,CommandType.Text,sql));
if(a==1)
{
string str="update KO_SignOn set IsPassed=1 where CheckID="+sn;
DbHelperSQL.Query(str);
return true;
}
else
{
return false;
}
错误 :Server Error in '/' Application.
--------------------------------------------------------------------------------浮点值 '636E7168' 超出了计算机表示范围(8 字节)。
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: 浮点值 '636E7168' 超出了计算机表示范围(8 字节)。表中,CheckID不是主键帮忙看看,谢谢!
代码:
string sn = this.Request.QueryString["sn"].ToString();
string sql = "select * from KO_SignOn where CheckID="+sn;
int a =Convert.ToInt32(SqlHelper.ExecuteScalar(SqlHelper.connectionString,CommandType.Text,sql));
if(a==1)
{
string str="update KO_SignOn set IsPassed=1 where CheckID="+sn;
DbHelperSQL.Query(str);
return true;
}
else
{
return false;
}
错误 :Server Error in '/' Application.
--------------------------------------------------------------------------------浮点值 '636E7168' 超出了计算机表示范围(8 字节)。
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: 浮点值 '636E7168' 超出了计算机表示范围(8 字节)。表中,CheckID不是主键帮忙看看,谢谢!
解决方案 »
- 如何用jquery获取下面控件的值啊
- datalist绑定后判断问题
- 网页中有js代码时IE7会有安全提示
- 一个关于框架的重要问题(C#+asp.net)--在线急等
- 如何判断ADODB.Stream流内容是否结束
- 水晶报表,为什么导航栏的图片显示不出来?????? 急,谢谢
- 紧急求救文件上传和下载的程序c#语言
- <%@ Page inherits="headBehind" src="head.cs" %> src如何指定绝对路径?
- 请教文件下载问题(100%结贴)
- ^_^终于混上了小星星,散分^_^
- 使用HttpWebRequest Post数据到一个页面地址,提示“远程服务器返回错误: (403) 已禁止”,求解。
- filemanager,有没用过这个控件吗?
string sql = "select * from KO_SignOn where CheckID= '" + sn + "'";就select不到东西了
string sn = this.Request.QueryString["sn"].ToString();
之后,sn具体的数据是什么。
new SqlParameter("@CheckID", SqlDbType.UniqueIdentifier)
};
parameters[0].Value = id;
string sql = "select * from KO_SignOn where CheckID= @CheckID";
int a =Convert.ToInt32(SqlHelper.ExecuteScalar(SqlHelper.connectionString,CommandType.Text,sql,parameters));
if(a==0)
{
return false;
}
else
{
string str="update KO_SignOn set IsPassed=1 where CheckID=@CheckID";
SqlHelper.ExecuteNonQuery(SqlHelper.connectionString,CommandType.Text,str,parameters);
return true;
}
int a =Convert.ToInt32(SqlHelper.ExecuteScalar(SqlHelper.connectionString,CommandType.Text,sql,parameters));
这个地方反回值不只是0或1,有时候是9很郁闷,先不管了吧,是0就return个false算了,update不会错.