using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.SqlClient;
using System.Web.UI.WebControls;
using System.Data;
using System.Windows;
public voidcollecttable(ListBox listname)
{
hookUp = new SqlConnection("Server=localhost\\SqlExpress;Database=gss;IntegratedSecurity=True");
hookUp.Open();
DataTable schema =hookUp.GetSchema("Tables");
listname.Items.Clear();
foreach (DataRow row in schema.Rows)
{
listname.Items.Add(row[2].ToString());
}
}
Comments: