一个更新数据的简单问题
<%
Set conn_1 = Server.CreateObject( "ADODB.Connection ")
conn_1.Open conStr
Set rs = Server.CreateObject( "ADODB.Recordset ")
sql= "select * from aaa "
rs.cursorLocation=3
rs.open sql,conn_1,1,1
JF=0
Do While Not rs.eof
JF= DateDiff( "m ",rs( "begintime "),now)*10
conn_1.Execute "update aaa set VIP_JF= "& JF
ejifen=0
rs.movenext
Loop
rs.close
set rs = nothing
conn_1.close
set conn_1 = nothing
%>
不知道为什么更新不了数据。各位大哥大姐帮帮我
------解决方案--------------------你没加条件判断,当然是全部更新了
conn_1.Execute "update aaa set VIP_JF= "& JF & " where id= "&rs( "id ")