Ver Mensaje Individual
  #1 (permalink)  
Antiguo 07/11/2008, 16:55
spiderman78
 
Fecha de Ingreso: abril-2008
Mensajes: 281
Antigüedad: 16 años, 1 mes
Puntos: 1
Error en el Update

Que tal como estan aqui consultando un error haber si me pueden ayudar, el error me lo marca al momento de hacer un update, mi codigo es el siguiente

Código:
Private Sub agendaagregar0()
    If Text2(400).Text = "" Then
        Exit Sub
    Else
    If Text12.Text = "" Then
        Call VisualizarAgendaa
     Set RecSQL = New ADODB.Recordset
         RecSQL.Open "INSERT INTO agendapacientes (fechaa,fechab,fecha,control,fecha1,hora,idpaciente,nombre,pago)" & _
         "VALUES (" & Text0(1) & ",'" & Text7 & "','" & Text1(0) & "','" & Text10(0) & "','" & Text2(200) & "','" & Text3(0) & "','" & Text2(400) & "','" & Combo3 & "','" & Text2(500) & "')", BD, adOpenStatic, adLockOptimistic
     Set RecSQL = Nothing
     Else
        Call VisualizarAgendaa
        BD.Execute "UPDATE agendapacientes SET fechaa='" & Text0(1) & "', fechab='" & Text7 & "',fecha='" & Text1(0) & _
        "' ,fecha1='" & Text2(200) & "',control='" & Text12 & "',hora='" & Text3(0) & "',idpaciente='" & Text2(400) & "',paciente='" & Combo3 & "',pago='" & Text2(500) & "' Where control = " & Text12-----------------------------------------------------------------en toda la instruccion me marca el error
     Set RecSQL = Nothing
    End If
    End If
End Sub
y me marca el siguiente error

[MySQL][ODBC 3.51 Driver][mysqld-4.0.11-gamma-nt]Unknown
column '07112008A1' in 'where clause'

'07112008A1'----esta parte que me marca el error es un campo que ocupo para hacer la consulta no se si vaya por ahi el problema.

Lo curioso es q si me guarda los cambios que le hice al registro

Saludos y garcias por sus respuestas