Update question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Adriano

    Update question

    Hello,

    I have a table with LastUpdated column,
    users update some data there in a datagrid, for examle rows 10, 15 and 20,
    the question is, is there a possible way to auto update (with current system
    datetime) that field (LastUpdated) for each changed row in the
    datasource???

    thanks in advance!
    Adriano



  • J. Alan Rueckgauer

    #2
    Re: Update question

    Adriano,

    Trap the dataset's RowUpdating event and assign Date.Now to the LastUpdated
    column.

    Alan

    "Adriano" <adriano@tadaz. com> wrote in message
    news:O0cdR0ueEH A.708@TK2MSFTNG P09.phx.gbl...[color=blue]
    > Hello,
    >
    > I have a table with LastUpdated column,
    > users update some data there in a datagrid, for examle rows 10, 15 and 20,
    > the question is, is there a possible way to auto update (with current[/color]
    system[color=blue]
    > datetime) that field (LastUpdated) for each changed row in the
    > datasource???
    >
    > thanks in advance!
    > Adriano
    >
    >
    >[/color]


    Comment

    • J. Alan Rueckgauer

      #3
      Re: Update question

      I should have had more coffee before hitting send. It should be the
      DataTABLE's RowChanging event.

      Grab the row that's being changed, then assign Date.Now as you wish.

      Coffee. Must...get...mo re...coffee...

      "J. Alan Rueckgauer" <void@dev.nul > wrote in message
      news:epJlA4veEH A.3928@TK2MSFTN GP11.phx.gbl...[color=blue]
      > Adriano,
      >
      > Trap the dataset's RowUpdating event and assign Date.Now to the[/color]
      LastUpdated[color=blue]
      > column.
      >
      > Alan
      >
      > "Adriano" <adriano@tadaz. com> wrote in message
      > news:O0cdR0ueEH A.708@TK2MSFTNG P09.phx.gbl...[color=green]
      > > Hello,
      > >
      > > I have a table with LastUpdated column,
      > > users update some data there in a datagrid, for examle rows 10, 15 and[/color][/color]
      20,[color=blue][color=green]
      > > the question is, is there a possible way to auto update (with current[/color]
      > system[color=green]
      > > datetime) that field (LastUpdated) for each changed row in the
      > > datasource???
      > >
      > > thanks in advance!
      > > Adriano
      > >
      > >
      > >[/color]
      >
      >[/color]


      Comment

      • Adriano

        #4
        Re: Update question

        hi Alan,

        I'm a newbie,
        can you please send me a code,

        thanks in advance!
        Adriano

        "J. Alan Rueckgauer" <void@dev.nul > wrote in message
        news:#Ixyq8veEH A.3376@TK2MSFTN GP10.phx.gbl...[color=blue]
        > I should have had more coffee before hitting send. It should be the
        > DataTABLE's RowChanging event.
        >
        > Grab the row that's being changed, then assign Date.Now as you wish.
        >
        > Coffee. Must...get...mo re...coffee...
        >
        > "J. Alan Rueckgauer" <void@dev.nul > wrote in message
        > news:epJlA4veEH A.3928@TK2MSFTN GP11.phx.gbl...[color=green]
        > > Adriano,
        > >
        > > Trap the dataset's RowUpdating event and assign Date.Now to the[/color]
        > LastUpdated[color=green]
        > > column.
        > >
        > > Alan
        > >
        > > "Adriano" <adriano@tadaz. com> wrote in message
        > > news:O0cdR0ueEH A.708@TK2MSFTNG P09.phx.gbl...[color=darkred]
        > > > Hello,
        > > >
        > > > I have a table with LastUpdated column,
        > > > users update some data there in a datagrid, for examle rows 10, 15 and[/color][/color]
        > 20,[color=green][color=darkred]
        > > > the question is, is there a possible way to auto update (with current[/color]
        > > system[color=darkred]
        > > > datetime) that field (LastUpdated) for each changed row in the
        > > > datasource???
        > > >
        > > > thanks in advance!
        > > > Adriano
        > > >
        > > >
        > > >[/color]
        > >
        > >[/color]
        >
        >[/color]


        Comment

        Working...