Ver Mensaje Individual
  #1 (permalink)  
Antiguo 22/02/2011, 13:18
cesarprt
 
Fecha de Ingreso: enero-2008
Ubicación: León
Mensajes: 10
Antigüedad: 17 años, 1 mes
Puntos: 0
No me guarda los datos modificados en la BD

Hola, esoy empezando a trabajar con vb 2010 y tengo un problema, en un formulario tengo unos campos que son los parametros de configuración, consigo leerlos de la BD pero una vez modificados no consigo que me almacene los cambios.
El código que uso para el botón guardar es el siguiente:

Código:
    Private Sub btnGuardar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGuardar.Click
        If txtImpor.Text <> "" Then
            Me.ActiveDataSet.Config.Rows(0)("importacion") = Me.txtImpor.Text
        End If
        If txtExporta.Text <> "" Then
            Me.ActiveDataSet.Config.Rows(0)("exportacion") = Me.txtExporta.Text
        End If
        If txtCoef1.Text <> "" Then
            Me.ActiveDataSet.Config.Rows(0)("coeficiente1") = Me.txtCoef1.Text
        End If
        If txtCoef2.Text <> "" Then
            Me.ActiveDataSet.Config.Rows(0)("coeficiente2") = Me.txtCoef2.Text
        End If
        If chkBarras.CheckState = CheckState.Checked Then
            Me.ActiveDataSet.Config.Rows(0)("barras") = 1
        Else
            Me.ActiveDataSet.Config.Rows(0)("barras") = 0
        End If
        Me.ActiveDataSet.Config.AcceptChanges()
        Me.ConfigTableAdapter.Update(Me.ActiveDataSet.Config)
        Me.Close()
    End Sub
Me gustaría que me pudierais echar una mano.
Muchas gracias por adelantado.