problem with datasource being updated when the page is refreshed (Gridview)

Discussion in 'ASP .Net' started by Mike Grace, May 4, 2006.

  1. Mike Grace

    Mike Grace Guest

    Hi,

    I have a gridview which is using a SqlDataSource to update a table.

    The SqlDatasource is using a stored procedure to update the table.

    If I edit a row, change a value and click update the change is successfully
    applied to the SQL table.

    After this, the values in the underlying table are changed by another
    process

    If I click the refresh button, when the page is redisplayed (after clicking
    retry on the warning), the underlying table is updated with the old values
    that were in the grid.

    This is obviously very dangerous.

    How can I stop this from happening?

    Surely when the page is refreshed, it shouldn't reapply the updates.

    Regards


    Mike
    Mike Grace, May 4, 2006
    #1
    1. Advertising

  2. Mike Grace

    Code Rodent Guest

    Bit of a long shot this, but you wouldn't happen to be the Mike Grace of
    Mileoak would you?

    Andy L of Shoreham

    "Mike Grace" <> wrote in message
    news:...
    > Hi,
    >
    > I have a gridview which is using a SqlDataSource to update a table.
    >
    > The SqlDatasource is using a stored procedure to update the table.
    >
    > If I edit a row, change a value and click update the change is
    > successfully applied to the SQL table.
    >
    > After this, the values in the underlying table are changed by another
    > process
    >
    > If I click the refresh button, when the page is redisplayed (after
    > clicking retry on the warning), the underlying table is updated with the
    > old values that were in the grid.
    >
    > This is obviously very dangerous.
    >
    > How can I stop this from happening?
    >
    > Surely when the page is refreshed, it shouldn't reapply the updates.
    >
    > Regards
    >
    >
    > Mike
    >
    >
    >
    Code Rodent, May 4, 2006
    #2
    1. Advertising

  3. Mike Grace

    Mike Grace Guest

    Yup. :)

    Mike

    "Code Rodent" <> wrote in message
    news:%23dEf%...
    > Bit of a long shot this, but you wouldn't happen to be the Mike Grace of
    > Mileoak would you?
    >
    > Andy L of Shoreham
    >
    > "Mike Grace" <> wrote in message
    > news:...
    >> Hi,
    >>
    >> I have a gridview which is using a SqlDataSource to update a table.
    >>
    >> The SqlDatasource is using a stored procedure to update the table.
    >>
    >> If I edit a row, change a value and click update the change is
    >> successfully applied to the SQL table.
    >>
    >> After this, the values in the underlying table are changed by another
    >> process
    >>
    >> If I click the refresh button, when the page is redisplayed (after
    >> clicking retry on the warning), the underlying table is updated with the
    >> old values that were in the grid.
    >>
    >> This is obviously very dangerous.
    >>
    >> How can I stop this from happening?
    >>
    >> Surely when the page is refreshed, it shouldn't reapply the updates.
    >>
    >> Regards
    >>
    >>
    >> Mike
    >>
    >>
    >>

    >
    >
    Mike Grace, May 5, 2006
    #3
  4. Mike Grace

    Mike Grace Guest

    How do I send you an email?

    Got an address.


    Mike

    "Mike Grace" <> wrote in message
    news:...
    > Yup. :)
    >
    > Mike
    >
    > "Code Rodent" <> wrote in message
    > news:%23dEf%...
    >> Bit of a long shot this, but you wouldn't happen to be the Mike Grace of
    >> Mileoak would you?
    >>
    >> Andy L of Shoreham
    >>
    >> "Mike Grace" <> wrote in message
    >> news:...
    >>> Hi,
    >>>
    >>> I have a gridview which is using a SqlDataSource to update a table.
    >>>
    >>> The SqlDatasource is using a stored procedure to update the table.
    >>>
    >>> If I edit a row, change a value and click update the change is
    >>> successfully applied to the SQL table.
    >>>
    >>> After this, the values in the underlying table are changed by another
    >>> process
    >>>
    >>> If I click the refresh button, when the page is redisplayed (after
    >>> clicking retry on the warning), the underlying table is updated with the
    >>> old values that were in the grid.
    >>>
    >>> This is obviously very dangerous.
    >>>
    >>> How can I stop this from happening?
    >>>
    >>> Surely when the page is refreshed, it shouldn't reapply the updates.
    >>>
    >>> Regards
    >>>
    >>>
    >>> Mike
    >>>
    >>>
    >>>

    >>
    >>

    >
    >
    Mike Grace, May 5, 2006
    #4
  5. Mike Grace

    Code Rodent Guest

    Hi Mike,

    or should I say Mick the fish. Withouht pasting my email addy directly into
    this NG use the following without the spaces and replace the AT for an @ on
    a n d y . l a m p e r AT d o t c o n n e c t e d . com.

    I'll be good to hear from you old bean.

    Cheers

    Andy


    "Mike Grace" <> wrote in message
    news:...
    > How do I send you an email?
    >
    > Got an address.
    >
    >
    > Mike
    >
    > "Mike Grace" <> wrote in message
    > news:...
    >> Yup. :)
    >>
    >> Mike
    >>
    >> "Code Rodent" <> wrote in message
    >> news:%23dEf%...
    >>> Bit of a long shot this, but you wouldn't happen to be the Mike Grace of
    >>> Mileoak would you?
    >>>
    >>> Andy L of Shoreham
    >>>
    >>> "Mike Grace" <> wrote in message
    >>> news:...
    >>>> Hi,
    >>>>
    >>>> I have a gridview which is using a SqlDataSource to update a table.
    >>>>
    >>>> The SqlDatasource is using a stored procedure to update the table.
    >>>>
    >>>> If I edit a row, change a value and click update the change is
    >>>> successfully applied to the SQL table.
    >>>>
    >>>> After this, the values in the underlying table are changed by another
    >>>> process
    >>>>
    >>>> If I click the refresh button, when the page is redisplayed (after
    >>>> clicking retry on the warning), the underlying table is updated with
    >>>> the old values that were in the grid.
    >>>>
    >>>> This is obviously very dangerous.
    >>>>
    >>>> How can I stop this from happening?
    >>>>
    >>>> Surely when the page is refreshed, it shouldn't reapply the updates.
    >>>>
    >>>> Regards
    >>>>
    >>>>
    >>>> Mike
    >>>>
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
    Code Rodent, May 5, 2006
    #5
  6. Mike Grace

    Mike Grace Guest

    O.K.

    Mike

    "Code Rodent" <> wrote in message
    news:...
    > Hi Mike,
    >
    > or should I say Mick the fish. Withouht pasting my email addy directly
    > into this NG use the following without the spaces and replace the AT for
    > an @ on a n d y . l a m p e r AT d o t c o n n e c t e d . com.
    >
    > I'll be good to hear from you old bean.
    >
    > Cheers
    >
    > Andy
    >
    >
    > "Mike Grace" <> wrote in message
    > news:...
    >> How do I send you an email?
    >>
    >> Got an address.
    >>
    >>
    >> Mike
    >>
    >> "Mike Grace" <> wrote in message
    >> news:...
    >>> Yup. :)
    >>>
    >>> Mike
    >>>
    >>> "Code Rodent" <> wrote in message
    >>> news:%23dEf%...
    >>>> Bit of a long shot this, but you wouldn't happen to be the Mike Grace
    >>>> of Mileoak would you?
    >>>>
    >>>> Andy L of Shoreham
    >>>>
    >>>> "Mike Grace" <> wrote in message
    >>>> news:...
    >>>>> Hi,
    >>>>>
    >>>>> I have a gridview which is using a SqlDataSource to update a table.
    >>>>>
    >>>>> The SqlDatasource is using a stored procedure to update the table.
    >>>>>
    >>>>> If I edit a row, change a value and click update the change is
    >>>>> successfully applied to the SQL table.
    >>>>>
    >>>>> After this, the values in the underlying table are changed by another
    >>>>> process
    >>>>>
    >>>>> If I click the refresh button, when the page is redisplayed (after
    >>>>> clicking retry on the warning), the underlying table is updated with
    >>>>> the old values that were in the grid.
    >>>>>
    >>>>> This is obviously very dangerous.
    >>>>>
    >>>>> How can I stop this from happening?
    >>>>>
    >>>>> Surely when the page is refreshed, it shouldn't reapply the updates.
    >>>>>
    >>>>> Regards
    >>>>>
    >>>>>
    >>>>> Mike
    >>>>>
    >>>>>
    >>>>>
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
    Mike Grace, May 5, 2006
    #6
    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. SSS
    Replies:
    4
    Views:
    417
  2. Mike Grace
    Replies:
    1
    Views:
    339
    Code Rodent
    May 5, 2006
  3. Kuldeep
    Replies:
    1
    Views:
    869
    Mark Rae
    May 29, 2007
  4. Dmitry Korolyov

    Datagrid not updated during delete, but updated during insert and update

    Dmitry Korolyov, Sep 22, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    402
    Dmitry Korolyov
    Sep 22, 2003
  5. Replies:
    2
    Views:
    126
Loading...

Share This Page