Hello ,
I'm trying to populate my BDPLite (d1_1) with dates from database
doing something like that ( part of my code)
Dim cmdI As New SqlCommand("select date from Calendar where ID = @ID ", cs) \\ Ex. the result is 1\1\2010
cmdI.Parameters.AddWithValue(
"@ID", ID)
Dim dr As SqlDataReader = cmdI.ExecuteReader()
If dr.HasRows Then
While dr.Read()
If Not dr.IsDBNull(0) Then
d1_1.SelectedValue =
CDate(dr(0).ToString())
End If
End While
End If
Now i see the BDPLite (d1_1) have 1\1\2010 in the textbox
Then i wanna to allow the user to change the date ( re-select another date )
Dim cmdU As New SqlCommand("UPDATE Calendar SET date=@Sdate WHERE ID=@ID ", cs)
cmdU.Parameters.AddWithValue(
"@ID", ID)
cmdU.Parameters.AddWithValue(
"@Sdate", d1_1.SelectedValue) \\ here should be the new selected date 9\1\2010
cmdU.ExecuteNonQuery()
but what I found after that the database value doesn't chenged :\
what is the problem here ? I wanna the user
* sorry for my poor English