一段菜鳥代碼。。提示錯誤。請高手指點
<%
a=request( "id ")
response.Write a
'response.end
dim conn,rs,cmd
Set conn=Server.CreateObject( "ADODB.Connection ")
dsn= "provider=sqloledb.1;data source=172.24.17.103;initial catalog=dlyh;User ID=sa;password=123456 "
conn.Open dsn
set rs=server.CreateObject( "ADODB.Recordset ")
sql= "select * from [ygzl] where user_name like ' "&a& " ' "
'rs.open sql,conn,1,1
set rs=conn.Execute(sql,asCmdText)
if rs.EOF then
Response.Write " <script> alert( '無此員工數據! ');history.back() </script> "
else
'sql= "update ygzl set user_dept= 'user_dept ',user_address= 'user_address ',user_tel= 'user_tel ',user_Email= 'user_Email ' where user_name= ' "&user_name& " ' "
user_name=rs( "user_name ")
user_dept=rs( "user_dept ")
user_address=rs( "user_address ")
user_tel=rs( "user_tel ")
user_Email=rs( "user_Email ")
rs.Update
Response.Write " <script> alert( '修改成功! ');history.back() </script> "
end if
%>
<html>
<head> <title> 更改記錄 </title>
<meta name= "GENERATOR " Content= "Microsoft Visual Studio .NET 7.1 ">
</head>
<body>
<div align= "center ">
<form name= "form1 " method= "post " action= "Update2.asp ">
<table align= "center " border= "1 ">
<tr> <td colspan= "2 " align= "center "> 員工基本情況表 </td> </tr>
<tr> <td align= "right "> 員工姓名: </td>
<td> <input type= "text " name= "txtName " value= <%=rs( "user_name ")%> readonly> </td> </tr>
<tr> <td align= "right "> 所在部門: </td>
<td> <input type= "text " name= "txtDepartment " value= <%=rs( "user_dept ")%> > </td> </tr>
<tr> <td align= "right "> 家庭住址: </td>
<td> <input type= "text " name= "txtAddr " value= <%=rs( "user_address ")%> > </td> </tr>
<tr> <td align= "right "> 家庭電話: </td>
<td> <input type= "text " name= "txtmail " value= <%=rs( "user_tel ")%> > </td> </tr>
<tr> <td align= "right "> Email: </td>
<td> <input type= "text " name= "txtemail " value= <%rs(user_Email)%> > </td> </tr>
<tr> <td align= "center "> <input type= "submit " value= "提交 "> </td>
<td align= "center "> <input type= "reset " value= "全部重寫 "> </td> </tr>
</table>
</form>
</div>
</body>
</html>
提示錯