如何显示一个表(ACCESS)

作者:袖梨 2022-06-30
<%sub Table_show(tablename)%>
     
     <%
     set rs=server.CreateObject("adodb.recordset")
     sql="select * from "&tablename
     rs.open sql,conn,1,1
     %> 
    
     <%for i=0 to rs.fields.count-1%> 
    <%=rs.fields(i).name%>
     <%next%> 
    
     <%do while not rs.eof%> 
    
     <%for i=0 to rs.fields.count-1%> 
    <%=rs(i)%>
     <%next%> 
    
     <%rs.movenext
     loop
     rs.close
     set rs=nothing%> 
          
<%end sub%>

相关文章

精彩推荐