Ver Mensaje Individual
  #1 (permalink)  
Antiguo 25/03/2011, 19:03
Avatar de gasafonso
gasafonso
 
Fecha de Ingreso: septiembre-2008
Mensajes: 357
Antigüedad: 15 años, 8 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 !!!!!!!!!!!!