以下是一個ASP修改記錄的代碼,沒提示任何錯誤,但就是寫不數據,請各位幫幫忙。其它數據我只讀取,修改的只有下面三條數據。
<%
'--------------------------
manyi=request("manyi")
pfr=request("pfr")
pfsj=now
'--------------------------
if manyi="" then
response.write "<script language='javascript'>" & VbCRlf
response.write "alert('您還沒打分呢?!');" & VbCrlf
response.write "history.go(-1);" & vbCrlf
response.write "</script>" & VbCRLF
response.end
end if
'--------------------------
if pfr="" then
response.write "<script language='javascript'>" & VbCRlf
response.write "alert('您還沒有填寫名字!');" & VbCrlf
response.write "history.go(-1);" & vbCrlf
response.write "</script>" & VbCRLF
response.end
end if
'----------------------------
sub myreplace(str)
str=replace(str,Chr(32)," ")
str=replace(str,VbCrlf,"<BR>")
end sub
myreplace memo
'------------------------------
connstr = "DBQ="+server.mappath("party.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};DriverId=25;FIL=MS Access;ImplicitCommitSync=Yes;MaxBufferSize=512;MaxScanRows=8;PageTimeout=5;SafeTransactions=0;Threads=3;UserCommitSync=Yes;"
Set Conn = Server.CreateObject("ADODB.Connection")
set rs=server.createobject("adodb.recordset")
conn.open connstr
sql="select * from party "
rs.open sql,conn,1,3
'---------------------------
rs("manyi")=manyi
rs("pfr")=pfr
rs("pfsj")=pfsj
rs.update
rs.close
response.redirect "admin/abc.asp"
%>