你说的方法和这个差不多,根本不行。
set rsc=server.CreateObject("adodb.recordset")
sqlc="select * from newscata"
rsc.open sqlc,conn,1,3
rsc.addnew
rsc("title")= addtitle
rsc("level") = alevel + 1
rsc("rootid") = "|"
rsc("type")=intType
rsc.update
newid=rsc("id")
rsc.close
rsc.open "select * from newscata where id="&newID,conn,1,3
gid= rsc("id")
groot = rsc("rootid")
c_groot = replace(groot,"|",gid)
rsc("rootid") =c_groot
rsc.update
rsc.close
set rsc=nothing