[求助]更新两个表里的数据,两段代码合一段
大家好:请教大家 如何将下面两段代码合成一段
strsql= "select * from CardInfo where CardSn=" & CardSna & ""
set rs5 = Server.CreateObject("ADODB.Recordset")
rs5.Open strsql, conn, 1, 3
rs5("CardSn")=request.form("CardSn")
rs5.update
rs5.close
set rs5=nothing
strsql= "select * from CardProduct where CardSn=" & CardSna & ""
set rs5 = Server.CreateObject("ADODB.Recordset")
rs5.Open strsql, conn, 1, 3
rs5("CardSn")=request.form("CardSn")
rs5.update
rs5.close
set rs5=nothing
还有更新的时候 CardProduct 表里面有多条一样的 CardSn记录 怎么只能更新一条呢,谢谢大家
[此贴子已经被作者于2007-6-26 17:09:26编辑过]