Foros del Web » Programación para mayores de 30 ;) » Programación General » Visual Basic clásico »

ERROR DE VERSION mysql

Estas en el tema de ERROR DE VERSION mysql en el foro de Visual Basic clásico en Foros del Web. Hola Gente Amiga, ando un con un problema, yo tengo este codigo o mejor dicho una SQL que es la siguiente: @import url("http://static.forosdelweb.com/clientscript/vbulletin_css/geshi.css"); Código vb: ...
  #1 (permalink)  
Antiguo 25/03/2011, 19:03
Avatar de gasafonso  
Fecha de Ingreso: septiembre-2008
Mensajes: 357
Antigüedad: 15 años, 7 meses
Puntos: 1
ERROR DE VERSION mysql

Hola Gente Amiga, ando un con un problema,
yo tengo este codigo o mejor dicho una SQL que es la siguiente:


Código vb:
Ver original
  1. Public Function MakeUpdateEventSQL(pEvent As CalendarEvent) As String
  2.     Dim strSQL As String
  3.  
  4.     strSQL = "UPDATE CalendarEvents SET " & vbCrLf
  5.     strSQL = strSQL + "Subject = " & MakeSQLstr(pEvent.Subject) & ", " & vbCrLf
  6.     strSQL = strSQL + "Location = " & MakeSQLstr(pEvent.Location) & ", " & vbCrLf
  7.     strSQL = strSQL + "Body = " & MakeSQLstr(pEvent.Body) & ", " & vbCrLf
  8.        
  9.     strSQL = strSQL + "IsMeeting = " & IIf(pEvent.MeetingFlag, 1, 0) & ", " & vbCrLf
  10.     strSQL = strSQL + "IsPrivate = " & IIf(pEvent.PrivateFlag, 1, 0) & ", " & vbCrLf
  11.    
  12.     strSQL = strSQL + "LabelID = " & pEvent.Label & ", " & vbCrLf
  13.     strSQL = strSQL + "BusyStatus = " & pEvent.BusyStatus & ", " & vbCrLf
  14.     strSQL = strSQL + "ImportanceLevel = " & pEvent.Importance & ", " & vbCrLf
  15.    
  16.     strSQL = strSQL + "StartDateTime = " & MakeSQLDateTime(pEvent.StartTime) & ", " & vbCrLf
  17.     strSQL = strSQL + "EndDateTime = " & MakeSQLDateTime(pEvent.EndTime) & ", " & vbCrLf
  18.        
  19.     strSQL = strSQL + "IsAllDayEvent = " & IIf(pEvent.AllDayEvent, 1, 0) & ", " & vbCrLf
  20.  
  21.     strSQL = strSQL + "IsReminder = " & IIf(pEvent.Reminder, 1, 0) & ", " & vbCrLf
  22.     strSQL = strSQL + "ReminderMinutesBeforeStart = " & pEvent.ReminderMinutesBeforeStart & ", " & vbCrLf
  23.     strSQL = strSQL + "RemainderSoundFile = " & MakeSQLstr(pEvent.ReminderSoundFile) & ", " & vbCrLf
  24.            
  25.     strSQL = strSQL + "RecurrenceState = " & pEvent.RecurrenceState & ", " & vbCrLf
  26.    
  27.     If pEvent.RecurrenceState = xtpCalendarRecurrenceMaster Or _
  28.        pEvent.RecurrenceState = xtpCalendarRecurrenceException Then
  29.        
  30.         strSQL = strSQL + "RecurrencePatternID = " & pEvent.RecurrencePattern.id & ", " & vbCrLf
  31.     Else
  32.         strSQL = strSQL + "RecurrencePatternID = 0, " & vbCrLf
  33.     End If
  34.    
  35.     strSQL = strSQL + "RExceptionStartTimeOrig = " & MakeSQLDateTime(pEvent.RExceptionStartTimeOrig) & ", " & vbCrLf
  36.     strSQL = strSQL + "RExceptionEndTimeOrig = " & MakeSQLDateTime(pEvent.RExceptionEndTimeOrig) & ", " & vbCrLf
  37.     strSQL = strSQL + "ISRecurrenceExceptionDeleted = " & IIf(pEvent.RExceptionDeleted, 1, 0) & ", " & vbCrLf
  38.    
  39.     strSQL = strSQL + "CustomPropertiesXMLData = " & MakeSQLstr(pEvent.CustomProperties.SaveToString) & " " & vbCrLf
  40.     strSQL = strSQL + "CustomIconsIDs = " & MakeSQLstr(pEvent.CustomIcons.SaveToString) & ", " & vbCrLf
  41.    
  42.     strSQL = strSQL + "ScheduleID = " & pEvent.ScheduleID & " " & vbCrLf
  43.    
  44.     strSQL = strSQL + "WHERE EventID = " & pEvent.id & ";"
  45.    
  46.     ''--------------------------------------------
  47.    MakeUpdateEventSQL = strSQL
  48. End Function

y me dice abajo en "inmediato"

"Cannot UpdateEvent in DB: [MySQL][ODBC 3.51 Driver][mysqld-5.1.33-community]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CustomIconsIDs = "",
ScheduleID = 0
WHERE EventID = 9' at line 22
Verdadero"

El que me quiera y pueda dar una mano


gracias !!!!!!!!!!!!
  #2 (permalink)  
Antiguo 28/03/2011, 10:57
Avatar de gasafonso  
Fecha de Ingreso: septiembre-2008
Mensajes: 357
Antigüedad: 15 años, 7 meses
Puntos: 1
Respuesta: ERROR DE VERSION mysql

Esta Consulta esta bien aca o deberia ir al espacio de MYSQL ?


gracias
  #3 (permalink)  
Antiguo 31/03/2011, 15:42
Avatar de gasafonso  
Fecha de Ingreso: septiembre-2008
Mensajes: 357
Antigüedad: 15 años, 7 meses
Puntos: 1
Respuesta: ERROR DE VERSION mysql

Y que paso con mi pregunta ? nadie la sabe ?

Despues pasa el tiempo y dicen " No rememorar viejas preguntas.........."

  #4 (permalink)  
Antiguo 01/04/2011, 09:56
Avatar de lokoman  
Fecha de Ingreso: septiembre-2009
Mensajes: 502
Antigüedad: 14 años, 7 meses
Puntos: 47
Respuesta: ERROR DE VERSION mysql

Sugerencias:
• Reemplaza "vbCrLf" por " _ "
• Elimina el " & ";" " al final del string
• Verifica la integridad de los datos, los campos de texto van con comillas simples ( 'valor' ) y los numericos no llevan
• Verifica la longitud del string, si es mas de 255 caracteres se trunca
• Prueba el contenido del string en una consulta directamente en la base de datos

Etiquetas: mysql
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 22:18.