ODBC guide

Create event


This example creates a new event in the specified calendar. Provide start and end times, time zones, summary, and optional details such as location and attendees. Supply the target calendar ID (e.g. primary or a custom calendar ID) in the WITH clause.

Note: Time zones are required for timed events. Attendees can be supplied as a JSON array.

INSERT INTO Events(StartsAt, StartsInTimeZone, EndsAt, EndsInTimeZone, Summary,
  Attendees, Description, Location, Status, Transparency, Visibility)
VALUES ('2021-11-26T16:30:50', 'Europe/Vilnius', '2021-11-27T16:30:50','Europe/Vilnius', 'This is an event',
        null, 'My Description', 'Vilnius', 'confirmed', 'opaque', 'default')
--WITH (CalendarId='primary')		   -- Use 'primary' for the main calendar
--WITH (CalendarId='YourCalendarId')  -- Or specify a custom calendar ID