Ver Mensaje Individual
  #1 (permalink)  
Antiguo 07/04/2008, 13:45
Avatar de Kitty_05
Kitty_05
 
Fecha de Ingreso: marzo-2008
Ubicación: SITEL un call center en Panamá
Mensajes: 100
Antigüedad: 17 años, 1 mes
Puntos: 0
Exclamación Actualizar registros en MySQL

Hello amigos!!

Tengo un pekeño inconveniente, estoy tratando de actualizar datos en mi tabla...
La manera en que estoy tratando d hacerlo es la siguiente...



Private Sub Command3_Click()
Dim BD As ADODB.Connection
Dim RecSQL As ADODB.Recordset
Dim ind As Integer
Dim x As Integer
Dim Tiene_Informacion As Boolean

Set BD = CONECTAR()
Set RecSQL = New ADODB.Recordset
RecSQL.Open "select * from provs", BD, adOpenStatic, adLockOptimistic
EstadoB.Text = "Autorizado"
Tiene_Informacion = False
x = 0
Do While x < 10
If (Trim$(DescripcionB(x).Text) <> "" And _
(MontoB(x).Text) <> "") Then
Tiene_Informacion = True
End If
x = x + 1
Loop

If Not Tiene_Informacion Then
MsgBox "Debe Introducir Datos en la prevision", vbOKOnly + vbCritical, "¡Atención!"
Else
ind = 0
Do While ind < 10 And _
Trim$(DescripcionB(ind).Text) <> "" And _
(MontoB(ind).Text) <> ""


RecSQL.Fields(0).Value = Trim$(Num_docB.Text)
RecSQL.Fields(1).Value = Trim$(DescripcionB(ind).Text)
RecSQL.Fields(2).Value = MontoB(ind).Text
RecSQL.Fields(3).Value = TotMontoB.Text
RecSQL.Fields(4).Value = FechaB.Text
RecSQL.Fields(5).Value = EstadoB.Text
RecSQL.Fields(6).Value = Trim$(CreadoB.Text)
RecSQL.Fields(7).Value = Form1.nom & " " & Form1.apel
RecSQL.Fields(8).Value = "."
RecSQL.Fields(9).Value = "."
RecSQL.Fields(10).Value = Form1.dir2
RecSQL.Fields(11).Value = Form1.dept2
RecSQL.Fields(12).Value = Form1.site2
RecSQL.Update

ind = ind + 1
Loop

continua = MsgBox("Prevision Autorizada, ¿Desea buscar otra prevision?", vbOK, "Continuar...")

If (continua = vbOK) Then
Unload Me
Load Form3
Else
Unload Form4
RecSQL.Close
Set RecSQL = Nothing
End If

' RecSQL.Update


End If

End Sub

Me ayudan??