打印本文 打印本文  关闭窗口 关闭窗口
显示sql数据库所有表的名称(带删除功能)
作者:采集员 文章来源:来源于网络 点击数: 更新时间:2005/9/10 14:01:27
("<table border=""1""><tr>" & vbCrLf)
    ' this will find all the fields in that table and write them out
    FOR EACH fieldname IN adoRS.fields
        Response.Write("<td><b><font size=""2"">" & fieldname.name & "</font></B></TD>")
    NEXT ' fieldname
    Response.Write("<td><b><font size=""2"">删除</font></B></TD>")
    Response.Write("      </tr>" & vbCrLf)
    DO  UNTIL adoRS.eof
        Response.Write("<tr>")
        FOR EACH fieldname IN adoRS.fields
            strFieldValue=fieldname.value
            strField=fieldname.name
            IF isnull(strFieldValue) THEN
                strFieldValue=shownull
            END IF
            IF trim(strFieldValue)="" THEN
                strFieldValue=showblank
            END IF
            IF strField = "ID" OR strField = "id" THEN
                strRecordID = strFieldValue
            END IF
            Response.Write("<td valign=top><font size=""2"">" & strFieldValue &

"</font></td>" & vbCrLf)
        NEXT
        Response.Write("<td valign=top><font size=""2""><a href=""index.asp?table=" &

Request.QueryString("table") & "&id=" & strRecordID & "&action=del"">删除</a></font></td>" &

vbCrLf)
    adoRS.movenext
    LOOP
    Response.Write("</table>")
    adoRS.close
    Response.Write("      </tr>" & vbCrLf)
    Response.Write("      <tr>" & vbCrLf)
    Response.Write("        <td></td>" & vbCrLf)
    Response.Write("      </tr>" & vbCrLf)
    Response.Write("    </table>" & vbCrLf)
    Response.Write("    </center></div></td>" & vbCrLf)
    Response.Write("  </tr>" & vbCrLf)
    Response.Write("</table>" & vbCrLf)
    Response.Write("</center></div>" & vbCrLf)
End Sub
%>

上一页  [1] [2] 



打印本文 打印本文  关闭窗口 关闭窗口