Como puedo darme cuenta si se hizo algun cambio el base de datos al ejecutar
este codigo:
AbrirConexion()
Dim cActualizar As OleDbCommand
cActualizar = New OleDbCommand("UPDATE AM_Medicamentos SET " & _
"Medicamentos = @Nombre," & _
"Presentacion_Medicamentos = @Presentacion," & _
"Descripcion_Medicamentos = @Descripcion," & _
"WHERE ID_Medicamentos = @ID", oSQLConn)
cActualizar.Parameters.Add("@Nombre", OleDbType.VarChar, 50).Value =
txtNombre.Text
cActualizar.Parameters.Add("@Presentacion", OleDbType.VarChar, 255).Value =
txtPresentacion.Text
cActualizar.Parameters.Add("@Descripcion", OleDbType.VarChar, 50).Value =
txtDescripcion.Text
cActualizar.Parameters.Add("@ID", OleDbType.Numeric, 10).Value =
txtCodigo.Text
Try
cActualizar.ExecuteNonQuery()
MsgBox("Información actualizada correctamente...", MsgBoxStyle.Information _
Or MsgBoxStyle.SystemModal _
Or MsgBoxStyle.MsgBoxRight _
Or MsgBoxStyle.MsgBoxRtlReading, "Info. Consultorio")
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical _
Or MsgBoxStyle.MsgBoxRight _
Or MsgBoxStyle.MsgBoxRtlReading)
End Try
Leer las respuestas