Ver Mensaje Individual
  #2 (permalink)  
Antiguo 21/11/2005, 14:23
reanimar
 
Fecha de Ingreso: junio-2005
Mensajes: 165
Antigüedad: 18 años, 11 meses
Puntos: 0
Yo lo hago asi...

Public Overrides Sub Modificar(ByVal Objeto As Object)
Try
Dim ds As New DataSet
Me.AbrirConexion()
Me.command = New OleDb.OleDbCommand("SELECT * FROM Editores WHERE EditorID= " & Objeto.EditorID, conexion)
Me.daEditor = New OleDb.OleDbDataAdapter(command)
Dim autogen As New OleDb.OleDbCommandBuilder(daEditor)
daEditor.Fill(ds, "Editores")
daEditor.UpdateCommand = autogen.GetUpdateCommand
Me.CerrarConexion()
Dim unaFila As DataRow = ds.Tables("Editores").Rows(0)
With unaFila
.Item("Perfil") = Objeto.perfil
.Item("Gen1") = Objeto.gen1
.Item("Gen2") = Objeto.gen2
.Item("Gen3") = Objeto.gen3
End With
Me.daEditor.Update(ds, "Editores")
Catch ex As Exception
Throw ex
End Try
End Sub

Espero que te sirva....