哈哈,dkp88看出了问题的关键,但指导出错
<!--#include file="Connections/conn2.asp" -->
<%sql="select * from picturedata where 身份证号='"&session("idcard")&"'"
Set rs = CreateObject("ADODB.Recordset")
rs.open sql,conn,1,3 '把这一句改了.
if rs.eof then
mgjz=request.Form("attach1")
shz1=request.Form("attach2")
shz2=request.Form("attach3")
xingming=request.Form("xingming")
idcard=request.Form("idcard")
inputdate=request.Form("inputdate")
SQL="insert into picturedata(免冠近照,生活照1,生活照2,操作者名称,身份证号,插入日期)values('"+mgjz+"','"+shz1+"','"+shz2+"','"+xingming+"','"+idcard+"',#"&inputdate&"#)"
rs.close
conn.execute SQL
conn.close
set conn=nothing%>
<%else
sql="select * from picturedata where 身份证号='"&session("idcard")&"'" '对了,这一句是蛇足
rs("免冠近照")=request.Form("attach1")”第19行
rs("生活照1")=request.Form("attach2")
rs("生活照2")=request.Form("attach3")
rs("修改者姓名")=request.Form("xingming")
rs("身份证号")=request.Form("idcard")
rs("修改日期")=request.Form("inputdate")
rs.update
rs.close
conn.execute SQL
conn.close
set conn=nothing%>
<%end if%>
<script language="javascript">
alert("照片信息添加成功!请确认完整资料");
location.href="main.htm";
</script>
[此贴子已经被作者于2006-12-29 11:33:31编辑过]