<html>
<head>
 
<title>留言维护回显</title>
</head>
<body>
<% 
submit=trim(request.form("submit"))
id=trim(request.form("id"))
name=trim(request.form("name"))
email=trim(request.form("email"))
note=trim(request.form("note"))
 
if submit="删除" then 
   first="false"
   condition="where"
   
   if id<>""then
        if first="true" then condition=condition & "and" 
        condition=condition & "序号=" & id
        first="true"
   end if 
   
   if name<>""then
         if first="true" then condition=condition & "and" 
         condition=condition & "姓名='" & name & "'" 
         first="true"
   end if 
   
   if email<>""then
         if first="true" then condition=condition & "and" 
         condition=condition & "email='" & email & "'"
         first="true"
   end if 
   
   if note<>""then
         if first="true" then condition=condition & "and" 
         condition=condition & "留言='" & note & "'"
         first="true"
   end if
   
   if first="true" then  
         sqlstr="delete from Notes" & condition
   end if 
   
Else
   if id="" then 
       response.redirect("noteEdit.asp")
   end if 
   
   first ="false" 
   setValue=""
  
   if name<>"" then
      if first="true" then setvalue=setvalue & ","
      setvalue=setvalue & "姓名='" & name & "'"
      first="true"
   end if 
  
   if email<>"" then
      if first="true" then setvalue=setvalue & ","
      setvalue=setvalue & "email='" & email & "'"
      first="true"
   end if 
   
   if note<>"" then
      if first="true" then setvalue=setvalue & ","
      setvalue=setvalue & "留言='" & note & "'"
      first="true"
   end if
   
   if first="true" then
          sqlstr="update notes set" & setvalue & " where 序号=" & id 
   end if 
   
end if
    if first="false" then
    response.redirect("noteedit.asp")
    end if 
    
   set conn=Server.CreateObject("ADODB.Connection")
   conn.open("dsn=fifasp")
   response.write(sqlstr)
   conn.execute(sqlstr)
   conn.close
   set recordset=nothing
   set conn=nothing
   response.redirect("noteEdit.asp")
%>      
   
</body>
这个程序为什么起不到删除和修改表notes 表信息的作用呢??? 数据库表notes放在fifasp.dmb的数据库里,数据系统源名为fifasp这个数据库连接是没错的.可以排除.
会不会是其它的逻辑或语法错了呢?但是又没错误提示出来.
请各位指教.谢谢.



 
											





 
	    

 
	
 
											

 晕.
晕.

