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
615
Database issues
posted

Hello, I'm trying to setup webschedule components to work with my own database instead of the default mdb file. I've used the SQL queries to create the correct tables/procs in my own database and now I'm trying to connect the webschedule components to that same database.

On my form, I've placed a WebScheduleInfo, WebScheduleSqlClientProvider and a SqlDataSource component. Now if I try to load the page, it gives me a 'Login failed for user 'sa'' error. That's strange, because I've set the SqlDataSource object to use my connectionstring as stored in web.config which has Integrated Security enabled. I don't understand why it's trying to connect via the sa account; maybe it's not picking up on my connectionstring or something.

Should above behaviour be working, or am I missing something?

Parents
No Data
Reply
  • 3707
    posted

    I'm having this same exact issue. WebSchedule worked on my initial tests with a different page, then after I did the same thing in another page it tells me the same exact error about the login failed. The rest of the website using the connection string works fine.

    Another strange thing, your join date is the same as my birth date. :P

    [Edit]

    Everyone was too slow for me, here's the fix to place in your page load event:

    if (!Page.IsPostBack)

    {

    WebScheduleSqlClientProvider1.Connection.ConnectionString =
    ConfigurationManager.ConnectionStrings["WebPortalWAConnectionString"].ConnectionString;

    }

    else

    {

    WebScheduleSqlClientProvider1.Connection.ConnectionString =
    ConfigurationManager.ConnectionStrings["WebPortalWAConnectionString"].ConnectionString;

    }

    It appears from previous posts they have issues when it comes to using WebSchedule with pages that are using a master page.

Children
No Data