你好朋友这里是我的代码
connect()
cmd.CommandText = "Select RegID,Name,EmailID,DOB,State,Nation,Contact1 As Contact,ParmanentAdd as Address,Religion,WillNo as WillNumber,Will from SelfInformation"
cmd.Connection = cn
dr = cmd.ExecuteReader(CommandBehavior.CloseConnection)
tb.Clear()
tb.Load(dr)
DataGridView1.DataSource = tb
cmd.Dispose()
cn.Close()
'family.........
connect()
'cmd.CommandText = "Select RegID,FName As Father,MName As Mother,MStatus As Marital,Degree,Childran As Children,NOC As NumberOfChild from Faimly"
'cmd.CommandType = CommandType.Text
'cmd.Connection = cn
'dr = cmd.ExecuteReader(CommandBehavior.CloseConnection)
'tb.Clear()
'tb.Load(dr)
'DataGridView1.DataSource = tb
'cmd.Dispose()
'cn.Close()
数据仅在 datagrid 视图中获取第二个表数据。我想从两个表中加载数据
请帮忙