yo tengo este codigo o mejor dicho una SQL que es la siguiente:
Código vb:
Ver original
Public Function MakeUpdateEventSQL(pEvent As CalendarEvent) As String Dim strSQL As String strSQL = "UPDATE CalendarEvents SET " & vbCrLf strSQL = strSQL + "Subject = " & MakeSQLstr(pEvent.Subject) & ", " & vbCrLf strSQL = strSQL + "Location = " & MakeSQLstr(pEvent.Location) & ", " & vbCrLf strSQL = strSQL + "Body = " & MakeSQLstr(pEvent.Body) & ", " & vbCrLf strSQL = strSQL + "IsMeeting = " & IIf(pEvent.MeetingFlag, 1, 0) & ", " & vbCrLf strSQL = strSQL + "IsPrivate = " & IIf(pEvent.PrivateFlag, 1, 0) & ", " & vbCrLf strSQL = strSQL + "LabelID = " & pEvent.Label & ", " & vbCrLf strSQL = strSQL + "BusyStatus = " & pEvent.BusyStatus & ", " & vbCrLf strSQL = strSQL + "ImportanceLevel = " & pEvent.Importance & ", " & vbCrLf strSQL = strSQL + "StartDateTime = " & MakeSQLDateTime(pEvent.StartTime) & ", " & vbCrLf strSQL = strSQL + "EndDateTime = " & MakeSQLDateTime(pEvent.EndTime) & ", " & vbCrLf strSQL = strSQL + "IsAllDayEvent = " & IIf(pEvent.AllDayEvent, 1, 0) & ", " & vbCrLf strSQL = strSQL + "IsReminder = " & IIf(pEvent.Reminder, 1, 0) & ", " & vbCrLf strSQL = strSQL + "ReminderMinutesBeforeStart = " & pEvent.ReminderMinutesBeforeStart & ", " & vbCrLf strSQL = strSQL + "RemainderSoundFile = " & MakeSQLstr(pEvent.ReminderSoundFile) & ", " & vbCrLf strSQL = strSQL + "RecurrenceState = " & pEvent.RecurrenceState & ", " & vbCrLf If pEvent.RecurrenceState = xtpCalendarRecurrenceMaster Or _ pEvent.RecurrenceState = xtpCalendarRecurrenceException Then strSQL = strSQL + "RecurrencePatternID = " & pEvent.RecurrencePattern.id & ", " & vbCrLf Else strSQL = strSQL + "RecurrencePatternID = 0, " & vbCrLf End If strSQL = strSQL + "RExceptionStartTimeOrig = " & MakeSQLDateTime(pEvent.RExceptionStartTimeOrig) & ", " & vbCrLf strSQL = strSQL + "RExceptionEndTimeOrig = " & MakeSQLDateTime(pEvent.RExceptionEndTimeOrig) & ", " & vbCrLf strSQL = strSQL + "ISRecurrenceExceptionDeleted = " & IIf(pEvent.RExceptionDeleted, 1, 0) & ", " & vbCrLf strSQL = strSQL + "CustomPropertiesXMLData = " & MakeSQLstr(pEvent.CustomProperties.SaveToString) & " " & vbCrLf strSQL = strSQL + "CustomIconsIDs = " & MakeSQLstr(pEvent.CustomIcons.SaveToString) & ", " & vbCrLf strSQL = strSQL + "ScheduleID = " & pEvent.ScheduleID & " " & vbCrLf strSQL = strSQL + "WHERE EventID = " & pEvent.id & ";" ''-------------------------------------------- MakeUpdateEventSQL = strSQL 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 !!!!!!!!!!!!
