Sql Query Not work with dhtmlxOptionsConnector in scheduler

Hi,
I am getting “Object reference not set to instance of an object” error.
when trying to run following code with version 1.5.

public override IdhtmlxConnector CreateConnector(HttpContext context)
{
dhtmlxSchedulerConnector connector = new dhtmlxSchedulerConnector(
"Select ScheduleID as id,scheduleTitle as text,Description as details,rec_type,event_length,event_pid,location,Label,ScheduleTypeID,createdBy,ClientId,AllDay,isSendNotification,reminder from advSchedules "
, “ScheduleID”
, dhtmlxDatabaseAdapterType.SqlServer2005
, ConfigurationManager.ConnectionStrings[“AdviserLogicConnectionString”].ConnectionString
, “startDate”
, “endDate”
, “ScheduleID as id, scheduleTitle as text,Description as details,rec_type,event_length,event_pid,location,Label,ScheduleTypeID,createdBy,ClientId,AllDay,isSendNotification,reminder”
);

dhtmlxOptionsConnector optionsConnector = new dhtmlxOptionsConnector(“comScheduleLabels”, “LabelID”, connector.Request.Adapter, “labelDescription”);
connector.AddOptionsConnector(“type”, optionsConnector);

return connector;
}

Note: It will work if pass only table name in constructor first parameter of dhtmlxSchedulerConnector

Hello,
I’ve tried to reproduce it with the demo from connectors package,
\samples\dhtmlxScheduler\scheulderOptions.ashx.cs
I’ve replaced connector configuration as following, which seemed to work correctly

var connector = new dhtmlxSchedulerConnector( "SELECT EventID as id, FromDate, ToDate, Subject as text, Details as details, Tags FROM Events" , "EventID" , dhtmlxDatabaseAdapterType.SqlServer2005 , ConfigurationManager.ConnectionStrings["SamplesDatabase"].ConnectionString , "FromDate" , "ToDate" , "Subject as text, Details as details, Tags" ); dhtmlxOptionsConnector optionsConnector = new dhtmlxOptionsConnector("types", "typeid",connector.Request.Adapter, "name"); connector.AddOptionsConnector("type", optionsConnector); return connector;
can you provide a demo project so we could reproduce the issue?

Hi Aliaksandr,
Thanks for reply,but in my case it is not working when define sql query.
I am still receiving same error.
I am attaching sample projects in which i customized.
i also attached create table script , i am using sql server 2008.
Please look into error asap.

Note: I have deleted App_data and other controls folder from project because of size limitation in attachments.
But it was same as given in your downloaded sample.

Thanks
Pavan Rathour
TableScript_Sql server2008.zip (683 Bytes)
samples.rar (1.53 MB)

Hi,
I forgot to attach table script for multi select.
Please find attached table script which i am using to fill multi select values.

Thanks
Pavan rathour
Mutilselect Table script.rar (412 Bytes)

After working more than 2 days i found issue.
Issue is “Select” and “From” in sql query is not in capital latters.

If you write “SELECT Description as text FROM advSchedules” it will work
and if you write
“Select Description as text from advSchedules” it will not work.

Please update your dll and handle it with .ToLower().

Thanks, we’ve confirmed a bug. Sorry for the inconvenience, we’ll update the package from our side