Jump to content

vb.net: open selected table in datagridview


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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...