Jump to content

vb.net: open selected table in datagridview


rony_78

Recommended Posts

can someone tell me how do I open selected table in another datagridview ? Please help me to solve it.thanks

Dim con As SqlCeConnection = New SqlCeConnection("Data Source=|DataDirectory|\Northwind.sdf;Password=***;Persist Security Info=True")		Dim Query2 As String = " Select * from INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'TABLE'"	   Dim DA As SqlCeDataAdapter, Ds As New DataSet, Dtb As New System.Data.DataTable	   con.Open()	   DA = New SqlCeDataAdapter(Query2, con)	   DA.Fill(Ds)	   con.Close()	   Dtb = Ds.Tables(0)	   DataGridView1.DataSource = Dtb

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...