Using SQL DataSource ?!

Answered (Not Verified) This post has 0 verified answers | 7 Replies | 5 Followers Thread's RSS feed.

Points 45
Replied On: Sat, Apr 18 2009 8:53 PM Reply

Hi, can't seem to get this one working. Here's what I did;

1-Loaded the provided sql file and created a mdf file out of it (everything worked fine)
2-Attached the mdf file to my project, with working connectionstring, etc.
3-Created a blank form with a working sqlDatasource, a webscheduleinfo and finally WebScheduleSqlClientProvider, a webmonthview, all binded together properly of course.

I always get that "provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server". If I switch to a WebScheduleOleDbProvider, it will simply ignore my sqldatasource and work with the default access database. Heck, even with an access datasource, it'll ignore it and work with the default database located in my documents folder.

Needless to say I need to work with a sql mdf file. Please let me know how to make all of this work, I tried all day ! Thanks

  • Post Points: 20

All Replies

Answered (Not Verified) Replied On: Tue, Apr 21 2009 9:52 AM Reply


To wire all the WebSchedule controls including WebMonthView to the SQL database you will need to do followings:  You should have WebMonthView and WebScheduleInfo controls on your page.

1.        Create a WebSchedule database. To create this database with the table and required StoredProcedures use the WebSchedule2. sql query file which will be located by default during the installation in following directory:

C:\Documents and Settings\All Users\Documents\Infragistics\NetAdvantage for .NET 200[Year] Vol. [Volume Number] CLR XX\WebSchedule\Data

2.       Drag and Drop SqlDataSource control to the page and click on the “Configure SqlDataSource” link in the smart tag of the object.

On the "Choose Your Data Connection" wizard step, either create a new connection string that refers to WebSchedule2 database, or use an existing one. Click Next.

On the "Configure the Select Statement" wizard step, select the first radio button with text "Specify a custom SQL statement or stored procedure". Click Next.

On the "Define Custom Statements or Stored Procedures" wizard step, use the SELECT tab and type in ";" in the Sql Statement text. Click on Next. On the "Test Query" wizard step, click on Finish.

3.       Drag and drop the WebScheduleSqlClientProvider control and set the DataSourceID to the SqlDataSource.ID and WebScheduleInfoID property to the lone WebScheduleInfo object’s ID.

Once WebScheduleInfo object fetches data with the help of WebScheduleSqlClientProvider, it feeds the activities in the wired WebSchedule controls. The following figure shows you how the WebSchedule controls are connected at a broader level: 

(WebMonthView, WebDayView, WebWeekView) <-- WebScheduleInfo <-- WebScheduleSqlClientProvider <-- SqlConnection <-- Sql Server Database




  • Post Points: 35
Points 515
Replied On: Thu, Apr 23 2009 6:33 PM Reply

If the page is inside a masterpage we are getting this error. If I remove master page it is working. Interesting

  • Post Points: 20
Replied On: Wed, Apr 29 2009 5:59 AM Reply


Since the controls are in a master page, all control’s IDs are going to change on a master page or user control.  The recommendation is that controls being wired-up by their Ids they should be assigned through code-behind. For example you can use following code:

protected void Page_Load(object sender, EventArgs e)


this.WebMonthView1.WebScheduleInfo = this.WebScheduleInfo1;

this.WebScheduleOleDbProvider1.WebScheduleInfo = this.WebScheduleInfo1;




  • Post Points: 20
Points 56
Replied On: Thu, Dec 17 2009 2:04 PM Reply

Hello, can somebody help me. I am facing big trouble here doing the webmonthview work with webscheduleinfo. It is very urgent for me if any body can help me out.

I have done the following thing ....

1. Put the Webmonthview on the page

2. Put the webscheduleinfo on the page

3. put the asp:sqldatasource on the page

4. put the webschedulesqlclientprovider on the page

5. then i initialize the webschedulesqlclientprovider with datasourceid = 'asp:Sqldatasource' id. I just want to show only the single column from this source into the date field of calendar. But it seems it doesn't works. Every time i get a message  - isnull function requires two arguments. It becomes a hell like problem for me.

Please help me.

The code on my page is: meetingorganizer.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/LoginMasterPage.master"
    AutoEventWireup="true" CodeFile="MeetingOrganizer.aspx.cs" Inherits="Default6" CodeFileBaseClass="BaseWebPage" %>

<%@ Register Assembly="Infragistics35.WebUI.Misc.v9.1, Version=9.1.20091.1015, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
    Namespace="Infragistics.WebUI.Misc" TagPrefix="igmisc" %>
<%@ Register Assembly="Infragistics35.WebUI.WebScheduleDataProvider.v9.1, Version=9.1.20091.1015, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
    Namespace="Infragistics.WebUI.Data" TagPrefix="ig_scheduledata" %>
<%@ Register Assembly="Infragistics35.WebUI.WebSchedule.v9.1, Version=9.1.20091.1015, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
    Namespace="Infragistics.WebUI.WebSchedule" TagPrefix="igsch" %>
<asp:Content ID="Content2" ContentPlaceHolderID="MasterPlaceHolder1" runat="Server">
    <div class="pageTitle">
        Meeting Organizer
    <div style="width: 100%; height: 15px">
        <hr class="hrcss" />
    <igmisc:WebAsyncRefreshPanel ID="WebAsyncRefreshPanel1" runat="server">
        <igsch:WebMonthView ID="WebMonthView1" runat='server' Width="600px" WeekendDisplayFormat="Full"
            WebScheduleInfoID="WebScheduleInfo1" AppointmentFormatString="&lt;SUBJECT&gt;">
        <igsch:WebScheduleInfo ID="WebScheduleInfo1" runat="server" StyleSetName="" StyleSetPath=""
        <ig_scheduledata:WebScheduleSqlClientProvider ID="WebScheduleSqlClientProvider1"
            runat="server" WebScheduleInfoID="WebScheduleInfo1" UseStoredProcedure="false"
        <%-- <igsch:WebDayView ID="WebDayView1" runat="server"
        WebScheduleInfoID="WebScheduleInfo1"  EnableAutoActivityDialog="true">
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:SmartClassConnectionString %>"
        0 [AllDayEvent],
        dailyvisitentry.[nextaction] [ActivityDescription],
        0 [Duration],
        'Noida' [Location],
        dailyvisitentry.ID [ActivityID],
        dailyvisitentry.[nextaction] [Subject],
        0 [EnableReminder],
        0 [ReminderInterval],
        0 [ShowTimeAs],
        0 [Importance],
        0 [Status],
        0 [RecurrenceID],
        0 [VarianceID],
        [creationdate] [_ts]
    Where [creationdate] between @StartDateTimeUtc and @EndDateTimeUtc

        0 [AllDayEvent],
        dve.[nextaction]   [ActivityDescription],
        0 [Duration],
        'Noida' [Location],
        dve.ID [ActivityID],
        dve.[nextaction] [Subject],
        0 [EnableReminder],
        0 [ReminderInterval],
        0 [ShowTimeAs],
        0 [Importance],
        0 [Status],
        0 [RecurrenceID],
        0 [VarianceID],
        dve.creationdate [_ts]
    From schoolmastermarketing
            join  usermaster on schoolmastermarketing.UserID = usermaster.uniqueid
            join dailyvisitentry as dve on usermaster.uniqueID = dve.createdby
    Where usermaster.usrid = @OrganizerName
        And dve.creationdate between @StartDateTimeUtc and @EndDateTimeUtc">
            <asp:SessionParameter Name="@OrganizerName" SessionField="@OrganizerName" />
            <asp:SessionParameter Name="@StartDateTimeUtc" SessionField="@StartDateTimeUtc" />
            <asp:SessionParameter Name="@EndDateTimeUtc" SessionField="@EndDateTimeUtc" />

and meetingorganizer.aspx.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using System.Data;
using Smart_Campus;
public partial class Default6 : BaseWebPage
    protected void Page_Load(object sender, EventArgs e)

        WebScheduleInfo1.ActiveResourceName = "edu25277";
        WebScheduleInfo1.ReminderFormPath = "";
        WebScheduleInfo1.AppointmentFormPath = "";


how should i make it work....can some body please provide me a sample work on this. my email id is

  • Post Points: 26
Alexander Todorov
Points 24,481
Infragistics Employee
Answered (Not Verified) Replied On: Fri, Dec 18 2009 6:09 AM Reply
Suggested by Alexander Todorov


The Sql provider requires certain DB schema to be present. You need to ensure you run the correct SQL scripts shipped with the installation.

For your scenario, what you could use is the WebScheduleGenericDataProvider, which is not bound to specific schema, and lets you configure the Schedule controls without modifying your database.

You can refer to samples and documentation here: => ASP.NET (AJAX Enabled) => WebSchedule => GenericDataProvider

and help here:


Hope it helps,



  • Post Points: 44
Points 56
Replied On: Mon, Dec 21 2009 12:38 AM Reply

Dear, Thanks for your help.I have applied the source and the functionality is running good. But still i have some problem.

Now i am facing two problems, which are as follows:

1. I have masterpage on my page where i have placed the controls and i am using <asp:LoginStatus> controls to singout and singin, when i click signout button, then first time it does not call the click of signout button and it also changes the master page on the page. When i now click on the signout buttons then it will call the signout function.

2. I have dropdowns on my page when i select any values from dropdown then search on it to bind the calendar with new values, then first time it will not refresh the calendar with new values, i need to click the navigate buttons on the calendar for it to refresh.


How should i solve these problems, please help me.

  • Post Points: 5
Points 20
Replied On: Sun, Apr 18 2010 7:26 AM Reply

There are a lot of problems for me)). But one of most difficult is the next. Exacter my sql server and files too were corrupted and I didn't know what to do. But unexpectedly I found in the Internet - how to repair sql server 2000 database. It resolved my trouble for seconds and free of charge as I kept in mind. It helped my friends too and some of them thanked me.

  • Post Points: 5
Page 1 of 1 (8 items) | RSS