GridView with changes transferred to db at end-of-edit

Discussion in 'ASP .Net Web Controls' started by R.A.M., Dec 20, 2006.

  1. R.A.M.

    R.A.M. Guest

    Hi,
    I am learning ASP.NET and I need to have an Excel-like sheet of records from
    database. Users may modify data in the sheet. I thought about using GridView
    with DataSource but the problem is that the changes should be transferred to
    database not when record is modified but when separate button is clicked
    (then a transaction with inserts/updates/deletes should be performed). As I
    understand database commands of DataSource are executed when records are
    modified.
    Do you know any good ideas? I think about storing (using DataSource
    commands) changes in temporal table and then transferring changes to main
    database table when button is pressed, but I don't know if it's a good
    solution because implementation will be rather complicated as I guess.
    /RAM/
     
    R.A.M., Dec 20, 2006
    #1
    1. Advertising

  2. R.A.M.

    R.A.M. Guest

    What do you think about this:

    In InsertCommand I insert into temporal table #i
    in UpdateCommand I insert into temporal table #u
    in DeleteCommand I insert into temportal table #d
    in SelectCommand I select from main table t and temporal tables:
    ( select * from t
    union
    select * from #i
    except
    select * from #d
    union
    select * from #u )
    except
    ( select key from t
    intersect
    select key from #u ) .
    On button click I transfer from temporal tables to main table t.

    U¿ytkownik "R.A.M." <> napisa³ w wiadomo¶ci
    news:emcar0$tja$...
    > I think about storing (using DataSource
    > commands) changes in temporal table and then transferring changes to main
    > database table when button is pressed, but I don't know if it's a good
    > solution because implementation will be rather complicated as I guess.
     
    R.A.M., Dec 20, 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. willwork4dsl
    Replies:
    1
    Views:
    378
    Tommy
    Feb 4, 2004
  2. Chapman
    Replies:
    3
    Views:
    1,141
    Gordon Beaton
    Sep 16, 2003
  3. R.A.M.
    Replies:
    1
    Views:
    335
    R.A.M.
    Dec 20, 2006
  4. Jeff
    Replies:
    2
    Views:
    449
    Alexey Smirnov
    Apr 3, 2009
  5. Dario Beraldi

    SFTP: max bytes to be transferred

    Dario Beraldi, Dec 1, 2010, in forum: Python
    Replies:
    0
    Views:
    350
    Dario Beraldi
    Dec 1, 2010
Loading...

Share This Page