插入Access记录后马上得到自动编号的值

<!--#include file="conn.asp"-->
<%
    OpenConn()
    Dim rs,temp
    Set rs=Server.Createobject("adodb.recordset")
    rs.open "select top 1 * from a",conn,3,3
    rs.addnew
        rs("title")="a"
        rs("content")="b"
    rs.update
    temp = rs.bookmark
    rs.bookmark = temp
    Response.write rs.Fields("ID")
    response.write("<br />"&rs.Fields("title"))
    response.write("<br />"&rs.Fields("content"))
%>

 

posted @ 2013-01-29 11:54  屌丝大叔的笔记  阅读(271)  评论(0编辑  收藏  举报