Help me check? I think there's something wrong with these codes especially to the date of birth(chodob) when i start debugging the database don't have any columns :(
Customer name = txtstdid
Name = txtstdname
Gender/Sex = cbosex
Date of Birth = chodob1, chodob2, chodob3
Identification card number = txtic
Passport number = txtpassn
Phone number = txtpn
Date of depature = dod1, dod2, dod3
Address = txtaddress
Address at the point of arrival = txtaapoa
Private Sub RefreshData()
If Not cnn.State = ConnectionState.Open Then
'open connection
cnn.Open()
End If
Dim da As New OleDb.OleDbDataAdapter("SELECT txtstdid as [ID], " & _
"txtstdname as [Name], cbosex as [Gender], chodob1 as [Date Of Birth], chodob2 as [Date Of Birth], chodob3 as [Date Of Birth], txtic as [Identification Number Card], txtpassn as [Passport Number], txtpn as [Phone Number], dod1 as [Date Of Departure], dod2 as [Date Of Departure], dod3 as [Date Of Departure], txtaddress as [Address], txtaapoa [Address At Point Of Arrival] " & _
" FROM plane ORDER by txtstdid", cnn)
Dim dt As New DataTable
'fill data to datatable
da.Fill(dt)
'offer data in data table into datagridview
Me.dgvData.DataSource = dt
'close connection
cnn.Close()
End Sub