Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
55
Databse problem with WebScheduleSqlClientProvider control
posted

 Hello.I have a WebScheduleSqlClientProvider and a sqldatasource control in my page.

I have set the datasorceId of the  WebScheduleSqlClientProvider to sqldatasourceId - SqlDataSource1.

In the SqlDataSource I have set to run a procedure with single parameter.

when i try to run the application it does not take this SP instead it takes the default one.

It is not taking the SP I have specified it takes the default DB.

How to solve this inorder to point the WebScheduleSqlClientProvider to point to my stored procedure.

Is there any thing we have to write in the code-behind.

Please help..

Thanks in advance

 

  • 140
    posted

    The WebScheduleGenericDataProvider could be a good option

  • 4960
    posted

    The only thing the WebSchedule data providers use an ASP.NET DataSource control for is to obtain it's Connection's ConnectionString.  All other settings on the DataSource control are ignored.

    To use your own stored procedure to select activities, you can implement a stored procedure called Activity_SelByDate that takes 3 parameters and returns the result set indicated in "Stored Procedures Used by WebSchedule Data Providers."  Inside your implementation, you can convert the 3 parameters into your 1 parameter and execute your 1 parameter stored procedure.  All that matters to the WebSchedule data provider is that it expects to call an Activity_SelByDate stored procedure that matches the contract/interface defined above.

    Definitions of what the data provider expects in this result set (e.g., meaning of "Status" values) can be found in the "Data Model for the Activity Table."  There is a data dictionary like this for each table in the standard WebSchedule data model.

    If your scheduling application is read-only, then customizing the SelByDate stored procedure may be sufficient, but if the appointments are updatable and/or you're working with recurrences you will need to handle the other stored procedures.

    HTH,