how to add two table in gridview with vb.net

preview_player
Показать описание
Imports System.Data.SqlClient
Dim conn As New SqlConnection("data source=.\sqlexpress;database=data;integrated security=true")
Dim cmd As SqlCommand = conn.CreateCommand()
Dim adapter As New SqlDataAdapter()
Dim ds As New DataSet()
adapter.SelectCommand = cmd
conn.Open()
adapter.Fill(ds, "emp")
conn.Close()
DataGridView1.DataSource = ds
DataGridView1.DataMember = "emp"
Рекомендации по теме
Комментарии
Автор

thanks bro, but can u tell me without sql that things, actually I m working with oledb, ado connection, , , I have two table 1 is customer info, 2nd is their bill... how I connected both .

amansamana
Автор

thank very much
exuse me sir
i wish to showing my db to datagridview, but i don't know the query (on ex:'"SELECT d.eid, d.department, e.adds, e.sal from depart d, emp e where d.eid = e.eid ")
how to find it on db sir, , please help me!!

gr-pro
join shbcf.ru