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

rs.open sql,conn,1,3这句话出错啊 大家帮帮忙啊 毕业设计时间就快到了
如下是代码
<title> 工资批量修改 </title>
<body>
<form   method= "post "   action= "c.asp ">

<th   colspan= "6 "   >   <font   size= "4 "   color= "#CC9900 ">   批量修改工资
   
</font> </th>
<ul>
<li   align=   "center ">   资料: <font   size= "4 "   color= "#CC9900 ">
<input   type= "text "   name=   "tt "   size= "12 ">
</font> (填写部门或职位)
    </td>

<li   align=   "left ">
<li> 工资:
    <input   type= "text "   name=   "aa "   size= "12 ">
<li   align=   "left ">
<li> 奖金:
    <input   type= "text "   name=   "ss "   size= "12 ">
<li   align=   "center ">
<li> 保险:
    <input   type= "text "   name=   "dd "   size= "12 ">
<li   align=   "center ">
<li> 津贴:
    <input   type= "text "   name=   "ff "   size= "12 ">

<li   align=   "center ">
<li> 税金:
    <input   type= "text "   name=   "gg "   size= "12 ">
</ul>
<br> <input   type= "submit "   value= "   提交   "   name= "btnSubmit "   size=30> </br>

</form>
</body>
<%
dim   conn
tt=trim(request.form( "tt "))
aa=trim(request.form( "aa "))
ss=trim(request.form( "ss "))
dd=trim(request.form( "dd "))
ff=trim(request.form( "ff "))
gg=trim(request.form( "gg "))

Set   conn   =   Server.CreateObject( "ADODB.Connection ") '创建一个数据库链接对象conn,方便后面调用
conn.ConnectionString   = "PROVIDER=SQLOLEDB;DATA   SOURCE=localhost;UID=sa;PWD=;DATABASE=test "   '创建一个数据库的recordset对象,方便以后调用
conn.Open '打开数据库
 
Set   rs=   Server.CreateObject( "ADODB.recordset ")
sql= "update   pays   set   basepay= "&aa& ",bonus= "&ss& ",risk= "&dd& ",allowance= "&ff& ",gaugers= "&gg& "   where   employname   in   (select   employname   from   employee   where   department= ' "&tt& " ') "
——> rs.open   sql,conn,1,3
%>
就是有箭头那句  
他说   Microsoft   OLE   DB   Provider   for   SQL   Server   错误   '80040e14 '  

第   1   行:   ', '   附近有语法错误。  

/c.asp,行51  
大家帮帮忙啊
毕业设计时间就快到了


------解决方案--------------------
If request.ServerVariables( "REQUEST_METHOD ") = "POST " Then


dim conn
tt=trim(request.form( "tt "))
aa=trim(request.form( "aa "))
ss=trim(request.form( &q