日期:2014-05-17  浏览次数:20774 次

asp修改数据问题
我在对数据库内数据进行修改时,当输入的原始内容为汉字或字母时,则无法进行修改,且不报错,原始内容为数字时,可以完成修改.请问为什么会出现这样的情况?

managecz.asp代码如下:

<!--#include   file= "conn.asp "-->
<%
dim   cls
if   session( "admin ")= " "   then
Response.Redirect( "admin.asp ")
else
if   session( "flag ") <> "0 "   then

cls   =   Instr(session( "flag "),   "danweifig ")
if   cls   <=   0   then
%>
<script   language= "javascript ">
if   (confirm( "您的操作权限不够,系统拒绝你的访问,请点确定返回,或者点取消退出重新登录 "))
    location.href= "login.asp ";
else
    location.href= "index.asp ";
</script>
<%
end   if
end   if
end   if
%>
<html>
<head>
<script>
function   IsDigit()
{
    return   ((event.keyCode   > =   48)   &&   (event.keyCode   <=   57));
}
</script>
<meta   http-equiv= "Content-Type "   content= "text/html;   charset=gb2312 ">
<link   href= "../images/css.css "   rel= "stylesheet "   type= "text/css ">
</head>
<body>

<table   class= "tableBorder "   width= "90% "   border= "0 "   align= "center "   cellpadding= "3 "   cellspacing= "1 "   bgcolor= "#FFFFFF ">
        <form   method= "post "   action= "setcz.asp?action=update ">
                    <tr>  
                        <td   colspan= "5 "   align= "center "   background= "../images/admin_bg_1.gif "> <b> <font   color= "#ffffff "> 材质设置 </font> </b> </td>
                    </tr>
            <tr   align=center   >  
                <td   width= "20% "   bgcolor= "fbc2c2 "> 序   号 </td>
                <td   width= "15% "   bgcolor= "fbc2c2 "> 材质名称 </td>
                <td   width= "15% "   bgcolor= "fbc2c2 "> 单   价 </td>
                <td   width= "30% "   bgcolor= "fbc2c2 "> 排   序(必填项数字) </td>
                <td   width= "20% "   bgcolor= "fbc2c2 "> 操   作 </td>
            </tr>
<%
Set   rs   =   Server.CreateObject( "ADODB.Recordset ")
rs.open   "SELECT     *   from   caizhi   order   by   danweiorder ",conn,1,1
if   rs.recordcount=0   then  
%>
<tr>  
<t