SqlConnection sqlconn = new SqlConnection(connectionstring);
        DataTable dt=new DataTable();
        sqlconn.Open();
        dt = sqlconn.GetSchema("Tables");
        foreach (System.Data.DataRow row in dt.Rows)
        {
                Response.Write(row["TABLE_NAME"] + "</br>");
        }
sqlconn.Close();
[參考]http://www.douban.com/note/19535276/

posted on 2009-02-11 15:19  不高很瘦  阅读(155)  评论(0编辑  收藏  举报