Update table by using LinQ VB.Net

watup

New Member
I'm trying to update a table in a SQL-database using LinQ. I want to update a field with the current date.Here is my code:\[code\] Public Sub UpdateRecord(ByVal reservationID As Integer) Dim insert As tblReservation = (From r In dc.tblReservations Where (r.ReservationId = reservationID) Select r).Single() insert.PickedUp = System.DateTime.Today dc.SubmitChanges() End Sub\[/code\]When I run this, everything seems to be okay, but no insert has taken place.Can anyone help me please?
 
Back
Top