<%
 ">

如何显示一个表的字段信息(ACCESS)

80酷酷网    80kuku.com

  access|显示 

<%sub Col_show(tablename)%>
   <table  border="1" cellspacing="0" cellpadding="3" bordercolor="#006699">
   <%
   tablename=trim(tablename)
   const adSchemaColumns=4
   set rs=Conn.openSchema(adSchemaColumns,Array(empty, empty,tablename,empty))
   rs.movefirst
   %> 
     <tr>
   <%for i=0 to rs.fields.count-1%> 
    <td><%=rs.fields(i).name%></td>
   <%next%> 
     </tr>
   <%do while not rs.eof%>
   
     <tr>
   <%for i=0 to rs.fields.count-1%> 
    <td>
     <%=rs(i)%>
    </td>
   <%next%> 
     </tr>
   
   <%rs.movenext
   loop
   rs.close
   set rs=nothing%> 
   </table>   
<%end sub%>


分享到
  • 微信分享
  • 新浪微博
  • QQ好友
  • QQ空间
点击: