J
JeremyGrand
This is reposted from the vb forum since a couple of folks there thought it
was more suited to this forum.
When I execute the following, it finishes without error (return value is 0),
but the field dateOfInspection remains unchanged. I've verified that the
values assigned to parameters (held in mRow) are correct and that the
connection string is correct and the connection is open.
I've also tried Cor's suggestion of using "?" parameters, and referring to
them by number. Outcome is identical.
What can I possibly be doing wrong here?
Dim cmd As New OleDbCommand("update cert set dateofinspection=@dof where
id=@id", cnnData)
With cmd
.CommandText = "update cert set dateofinspection=@dof where id=@id"
.Parameters.Add("@id", OleDbType.BigInt)
.Parameters.Add("@dof", OleDbType.Date)
.Parameters("@id").Value = mRow.Item("id")
.Parameters("@dof").Value = mRow("dateofinspection")
.ExecuteNonQuery()
End With
was more suited to this forum.
When I execute the following, it finishes without error (return value is 0),
but the field dateOfInspection remains unchanged. I've verified that the
values assigned to parameters (held in mRow) are correct and that the
connection string is correct and the connection is open.
I've also tried Cor's suggestion of using "?" parameters, and referring to
them by number. Outcome is identical.
What can I possibly be doing wrong here?
Dim cmd As New OleDbCommand("update cert set dateofinspection=@dof where
id=@id", cnnData)
With cmd
.CommandText = "update cert set dateofinspection=@dof where id=@id"
.Parameters.Add("@id", OleDbType.BigInt)
.Parameters.Add("@dof", OleDbType.Date)
.Parameters("@id").Value = mRow.Item("id")
.Parameters("@dof").Value = mRow("dateofinspection")
.ExecuteNonQuery()
End With