Ver Mensaje Individual
  #6 (permalink)  
Antiguo 23/03/2005, 08:51
Avatar de RootK
RootK
Moderador
 
Fecha de Ingreso: febrero-2002
Ubicación: México D.F
Mensajes: 8.004
Antigüedad: 23 años, 1 mes
Puntos: 50
Te recomiendo que cuando hagas update, delete, insert uses el executenonquery, ya que no hay necesidad de usar un datareader.

Te podría quedar así:

Cita:
...
...
While mireader.Read
refer = Mid(mireader("codref"), 4, 3)
Dim lon As Int32 = refer
If lon >= min And lon <= max Then
Me.proceso.Text = mireader("codref")
Dim r As String = mireader("codref")
Dim l As Int16 = mireader("numlin")
sentencia = "update eplt set codmaq=" & Me.maqnue.Text & " where codref='" & r & "' and numlin=" & l & ""
p.retornaregistro(mico2, sentencia)
mireader2.Close()
End If
End While
...
...
y en tu método:

Cita:
Public Sub retornaregistro(ByVal conf As BLL.Datos, ByVal sql As String)
Dim Lcom As New System.Data.SqlClient.SqlCommand(sql, conf.conex)
conf.conex.open()
Lcom.ExecuteNonQuery()
conf.conex.close()
End Sub
Pruebalo y cualquier cosa por aqui andamos...
__________________
Nadie roba nada ya que en la vida todo se paga . . .

Exentrit - Soluciones SharePoint & Net