基于ASP的SQL小区物业管理系统课程设计
源代码在线查看: sfxm_do.asp
dim room_id,money,oname,ntime
room_id=Request.Form("room_id")
money=Cint(Trim(Request.Form("asd")))
oname=Request.Form("name")
ntime=now()
set cmd=Server.CreateObject("ADODB.COMMAND")
cmd.ActiveConnection=conn
'cmd.CommandText="select max(id) from tmoney" '查找ID值
'set rs=cmd.execute
'dim y_id
'y_id=rs(0)+1
cmd.CommandText="insert into tmoney values('"&room_id&"','"&oname&"','"&ntime&"','"&money&"')"
cmd.execute
cmd.CommandText="update money set rest=rest+'"&money&"'where odate=(select max(odate) from money where room_id='"&room_id&"')"
cmd.execute
Response.Redirect("sfxm.asp")
%>