Need some ideas to selectively fetch data via object data source or cache...

Discussion in 'ASP .Net' started by Siva, Apr 24, 2006.

  1. Siva

    Siva Guest

    Hi,
    I have a 3 tier ASP.Net app for a handheld which needs to fetch
    orders from database via a DAL and populate it in a gridview using
    objectdatasource. In the search page I have a few parameters and when
    the search button is clicked I am sending those parameters via query
    string ( I need to do this since my app will run in a handheld which
    has certain restrictions). In the order list page, I am passing those
    parameters to the DAL as queryparameters. Once I fetch the data from
    DAL, I am populating the data on the datagrid.
    Now, once the data is displayed, when the user selects a row I am
    pointing them to a separate "edit" page, where they can edit several
    fields corresponding to that row (not all of them will be displayed in
    the gridview, so gridview in place editing can not be done) and when
    the user hits save, I need to pass those values back to the "order
    list" page where the gridview is displayed. Now once they redirected
    back to the gridview page, I dont want the object data source to fetch
    the data again from database but use the data already I am caching in
    that page. Is this even possible? Since we have everything done
    declaratively, how do I even selectively bind the gridview to the
    cached data in one case vs. getting the data from database in the other
    case.
    I know, instead of decalratively adding parameters , I can also add
    them in the page _load using ObjectDataSource1.SelectParameters.Add.
    But how do I let the code to get the data from database in one case and
    let the data from cache bind back to the gridview in the other case?
    Any help would be very much appreciated.
    Thanks
    -Siva
     
    Siva, Apr 24, 2006
    #1
    1. Advertising

  2. Siva

    Jeff Dillon Guest

    Rebind. What if you have a concurrency violation? Let the backend handle
    that, and take the db hit again

    Jeff
    "Siva" <> wrote in message
    news:...
    > Hi,
    > I have a 3 tier ASP.Net app for a handheld which needs to fetch
    > orders from database via a DAL and populate it in a gridview using
    > objectdatasource. In the search page I have a few parameters and when
    > the search button is clicked I am sending those parameters via query
    > string ( I need to do this since my app will run in a handheld which
    > has certain restrictions). In the order list page, I am passing those
    > parameters to the DAL as queryparameters. Once I fetch the data from
    > DAL, I am populating the data on the datagrid.
    > Now, once the data is displayed, when the user selects a row I am
    > pointing them to a separate "edit" page, where they can edit several
    > fields corresponding to that row (not all of them will be displayed in
    > the gridview, so gridview in place editing can not be done) and when
    > the user hits save, I need to pass those values back to the "order
    > list" page where the gridview is displayed. Now once they redirected
    > back to the gridview page, I dont want the object data source to fetch
    > the data again from database but use the data already I am caching in
    > that page. Is this even possible? Since we have everything done
    > declaratively, how do I even selectively bind the gridview to the
    > cached data in one case vs. getting the data from database in the other
    > case.
    > I know, instead of decalratively adding parameters , I can also add
    > them in the page _load using ObjectDataSource1.SelectParameters.Add.
    > But how do I let the code to get the data from database in one case and
    > let the data from cache bind back to the gridview in the other case?
    > Any help would be very much appreciated.
    > Thanks
    > -Siva
    >
     
    Jeff Dillon, Apr 24, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eqbal Z
    Replies:
    3
    Views:
    5,093
    Eqbal
    Nov 16, 2003
  2. Replies:
    4
    Views:
    541
  3. Mudcat
    Replies:
    1
    Views:
    392
    Mudcat
    May 26, 2005
  4. John
    Replies:
    2
    Views:
    1,185
  5. Yaron Cohen
    Replies:
    0
    Views:
    329
    Yaron Cohen
    Nov 19, 2003
Loading...

Share This Page