custom sql query for insert

Hi

How to write the custom sql query for insert scheduler using connector.Request.customsql.Add()

Now i wrote like following

public override IdhtmlxConnector CreateConnector(HttpContext context)
{

    dhtmlxSchedulerConnector connector = new dhtmlxSchedulerConnector(
       "select Events,Facility,Events.Provider as Provider,Events.Patients as Patients,Events.VisitType as VisitType,Events.ExamRoom as ExamRoom,VisitNotes as text,Events.ScheduleStatus as ScheduleStatus,ScheduleTypes,FromDate,ToDate,PatientName,ProviderName,visitTypeName,ExamRoomName,ScheduleStatusName from Events as Events Inner join Patients on Patients.Patients=Events.patients Inner join Providers on Providers.Providers=Events.Provider Inner join visitType on visitType.visitType=Events.visitType Inner join ExamRoom on ExamRoom.ExamRoom=Events.ExamRoom Inner join ScheduleStatus on ScheduleStatus.ScheduleStatus=Events.ScheduleStatus"
    , "Events" //primary key
     , dhtmlxDatabaseAdapterType.SqlServer2005 //using database
     , SessionDbConnectionString
     , "FromDate" //field
     , "ToDate"   //field
     , "Facility,Events.Provider as Provider,Events.Patients as Patients,Events.VisitType as VisitType,Events.ExamRoom as ExamRoom,VisitNotes as text,Events.ScheduleStatus as ScheduleStatus,ScheduleTypes,PatientName,ProviderName,visitTypeName,ExamRoomName,ScheduleStatusName"  //fields
 );

connector.Request.CustomSQLs.Add(CustomSQLType.Insert,
@“INSERT INTO Events VALUES (Facility, Events.Provider, Events.Patients, Events.VisitType, Events.ExamRoom,VisitNotes, Events.ScheduleStatus, Events.ScheduleTypes, FromDate, ToDate)”);

    return connector;

}

You need to use placeholders in the SQL , like

connector.Request.CustomSQLs.Add(CustomSQLType.Insert, @"INSERT INTO Events VALUES ({Facility}, {Provider}, {Patients}, {VisitType}, {ExamRoom},{VisitNotes}, {ScheduleStatus}, {ScheduleTypes}, {FromDate}, {ToDate})");