access|asp.net protected void GetTable() public override void VerifyRenderingInServerForm(Control control)
{
object[] restrictions = new object[] { null, null, null, "TABLE" }; //
OleDbConnection getTableConn = new OleDbConnection(CgetConnStr.connString);
getTableConn.Open();
DataTable tempTable = getTableConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables,restrictions);
ArrayList TableName = new ArrayList();
int count = tempTable.Rows.Count;
for (int i = 0; i < count; i++)
{
TableName.Add(tempTable.Rows[i]["TABLE_NAME"].ToString());
TextBox tempTb = new TextBox();
tempTb.ID = "tb" + i.ToString();
tempTb.Text = (string)TableName[i];
this.Controls.Add(tempTb);
}
getTableConn.Close();
}
{
}
Asp.net获取Access中现有表名
80酷酷网 80kuku.com