SoloCodigo

CLR: .Net / Mono / Boo / Otros CLR => VB .NET => Mensaje iniciado por: helevega11 en Martes 7 de Octubre de 2008, 03:25

Título: guardar datagridview
Publicado por: helevega11 en Martes 7 de Octubre de 2008, 03:25
Hola a Todos!

Estoy utilizando el siguiente codigo para guardar los campos de un datagridview pero me sale el siguiente error: "Update requiere que UpdateCommand sea válido cuando se pasa la colección DataRow con filas modificadas. "

Private Sub Actualizar(Optional ByVal bcargar As Boolean = True)

If Not bs.DataSource Is Nothing Then
OleDbDataAdapter.Update(CType(bs.DataSource, DataTable))

If bcargar Then
CargarRegistros("Select nombre,fechanac,telefono,celularP,celularM,correoelectronico, mensualidad,estadopago From Maternal", dbmaternal)
End If
End If
End Sub

De antemano muchas gracias