Hi Stanislav,
I really appreciate all the help you have been giving me in trying to get this to work. I fell back on using the .net adapter as I thought that wouldn’t have any dependencies or need any installation.
Following the example online on the .net adapter I get the following error Error 7 ‘dhtmlxConnectors.dhtmlxSchedulerConnector’ does not contain a constructor that takes 5 arguments C:\Users\syeap1\documents\visual studio 2013\Projects\calendar\calendar\connector\myconnector.ashx.cs 19 20 calendar
when I run this in VS2013.
This is my code for the connector
[code]using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using dhtmlxConnectors;
using System.Configuration;
namespace calendar.connector
{
///
/// Summary description for myconnector
///
public class myconnector : dhtmlxRequestHandler
{
public override IdhtmlxConnector CreateConnector(HttpContext context)
{
return new dhtmlxSchedulerConnector(
"events", //table to select from
"start_date,end_date,text", //fields to select
"id", //primary key column name
dhtmlxDatabaseAdapterType.SqlServer2005, //predefined database adapter type
ConfigurationManager.ConnectionStrings["downtime"].ConnectionString //connection string
//, "start_date"
//, "end_date"
//, "text"
);
}
}
}[/code]
I modified this according to the sample provided with the .net connector files and instead get this error. The page loads but after a while the debugger kicks in and I get the attached error.
[code]using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using dhtmlxConnectors;
using System.Configuration;
namespace calendar.connector
{
///
/// Summary description for myconnector
///
public class myconnector : dhtmlxRequestHandler
{
public override IdhtmlxConnector CreateConnector(HttpContext context)
{
return new dhtmlxSchedulerConnector(
"dbo.events", //table to select from
//"start_date,end_date,text", //fields to select
"id", //primary key column name
dhtmlxDatabaseAdapterType.SqlServer2005, //predefined database adapter type
ConfigurationManager.ConnectionStrings["downtime"].ConnectionString //connection string
, "start_date"
, "end_date"
, "text"
);
}
}
}[/code]
Also a more important question is that both samples do not show where to enter the user id and password to connect to the database. Where should that be specified?
Also I am using SQL Server 2008 R2, how should the dhtmlxDatabaseAdapaterType be changed to if it needs to be changed?
Best regards,
Brax