I'm getting concurrency violations on the following code:
I believe it has to do with the TStamp field but don't know how to fix it. TStamp is in Access 2003 as a datetime field.
Can anyone help me?
thks!
Code:
sSql = "UPDATE tblShippers SET ShipperKey = ?, " & _
"Description = ?, " & _
"MaxWeight = ?, " & _
"TStamp = '" & Now() & "' " & _
" WHERE ShipperUID = ? AND TStamp = ?"
da.UpdateCommand = New OleDbCommand(sSql, Conn)
da.UpdateCommand.Parameters.Add("@ShipperKey", OleDbType.Char, 10, "ShipperKey")
da.UpdateCommand.Parameters.Add("@Description", OleDbType.Char, 100, "Description")
da.UpdateCommand.Parameters.Add("@MaxWeight", OleDbType.Integer, 10, "MaxWeight")
da.UpdateCommand.Parameters.Add("@oldShipperUID", OleDbType.Integer, 10, "ShipperUID").SourceVersion = DataRowVersion.Original
da.UpdateCommand.Parameters.Add("@oldTStamp", OleDbType.Date)
da.UpdateCommand.Parameters(4).SourceColumn = "TStamp"
da.UpdateCommand.Parameters(4).SourceVersion = DataRowVersion.Original
I believe it has to do with the TStamp field but don't know how to fix it. TStamp is in Access 2003 as a datetime field.
Can anyone help me?
thks!