vb.net: open selected table in datagridview

Joined
Oct 29, 2012
Messages
2
Reaction score
0
can someone tell me how do I open selected table in another datagridview ?
thanks
HTML:
     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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top