0
你好朋友在這裏是我的代碼獲取數據到數據網格視圖在vb.net
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()
數據只取數據網格視圖。我的第二個表中的數據要加載從數據兩個表
請幫助