Hi,
I have three comboboxes, one for day, one for month, one for year. i need to combine these into a single string in order to update a Date of Birth entry in my database,
Heres what i have so far:
Dim day As Integer = Integer.Parse(dobDayComb.SelectedItem.ToString())
Dim month As Integer = Integer.Parse(dobMonthComb.SelectedItem.ToString())
Dim year As Integer = Integer.Parse(dobYearComb.SelectedItem.ToString())
Dim myDate As New Date(day, month, year)
myCommand.CommandText = "INSERT INTO table(dob) " & _
" VALUES ('?theDob');" & _
myCommand.Parameters.AddWithValue("?theDob", myDate)
apologies for the code, im a forum noob, dunno how to embed code
I have three comboboxes, one for day, one for month, one for year. i need to combine these into a single string in order to update a Date of Birth entry in my database,
Heres what i have so far:
Dim day As Integer = Integer.Parse(dobDayComb.SelectedItem.ToString())
Dim month As Integer = Integer.Parse(dobMonthComb.SelectedItem.ToString())
Dim year As Integer = Integer.Parse(dobYearComb.SelectedItem.ToString())
Dim myDate As New Date(day, month, year)
myCommand.CommandText = "INSERT INTO table(dob) " & _
" VALUES ('?theDob');" & _
myCommand.Parameters.AddWithValue("?theDob", myDate)
apologies for the code, im a forum noob, dunno how to embed code