Getting Original Values For Update

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Getting Original Values For Update

    Hi --

    I am using webmatrix so whatever I try and do is determined by what I can do
    by hand. That said, I am trying to figure out how to get the original values
    for a field that is being edited.

    What I have is a table that had 2 fields in it. Let's say Field1 and Field2.
    The key to the table is Field1, Field2 so the ddl would look like this:

    create table MyTable (
    Field1 varchar(10) not null
    ,Field2 varchar(10) not null
    )

    I have created a datagrid to edit it however, if someone changes either
    value the update statement needs to know what both the original values were.
    I have considered making my select statement get both fields twice and
    setting the columns for the second set in the datagrid to not visible, but
    then I can't seem to figure out how to get the hidden values when someone
    presses the Update.

    All in all I jus figured that it was getting too involved to be doing it
    correctly, so I thought I'd just ask...

    -- Bradley


    Bradley M. Small Guest

  2. Similar Questions and Discussions

    1. how do we trace who update the values?
      Hi.. my DW pages require user to logon with login user server behaviors, and every table has coulmn called updatedby.. so if user updating the...
    2. Charts... how to auto update values
      I have worked with Illustrator to automate updates in chart values by using actions. I am trying to use freehand becasue it allows easier formatting...
    3. Prove this critical update from the Microsoft (ORIGINAL REPLY)
      ***** SORRY... my newsreader complained about the size of my reply (in replying to the message, I picked up the original "virus" email attachment...
    4. Get Original Querystring Values After Decryption
      Anyone have a VB function or know how to retrieve original querystring values after they have been decryted and lie within a string? For example:...
    5. Free Original copy of Never Winter Nights for Linux going! (and its original)
      Hi, Yes you read the title correctly, being a complete idiot I ordered 2 copies of nwn from tuxgames, I could of sent it back, but I went on...
  3. #2

    Default Re: Getting Original Values For Update

    Bradley,

    Check out the .HasVersion property of DataRow class
    You can retreive Original, Current and Proposed values of the DataRowVersion

    Stephen

    "Bradley M. Small" <BSmall@XNOSPAMXmjsi.com> wrote in message
    news:ehgLoM8SDHA.1992@TK2MSFTNGP12.phx.gbl...
    > Hi --
    >
    > I am using webmatrix so whatever I try and do is determined by what I can
    do
    > by hand. That said, I am trying to figure out how to get the original
    values
    > for a field that is being edited.
    >
    > What I have is a table that had 2 fields in it. Let's say Field1 and
    Field2.
    > The key to the table is Field1, Field2 so the ddl would look like this:
    >
    > create table MyTable (
    > Field1 varchar(10) not null
    > ,Field2 varchar(10) not null
    > )
    >
    > I have created a datagrid to edit it however, if someone changes either
    > value the update statement needs to know what both the original values
    were.
    > I have considered making my select statement get both fields twice and
    > setting the columns for the second set in the datagrid to not visible, but
    > then I can't seem to figure out how to get the hidden values when someone
    > presses the Update.
    >
    > All in all I jus figured that it was getting too involved to be doing it
    > correctly, so I thought I'd just ask...
    >
    > -- Bradley
    >
    >

    Stephen Muecke Guest

  4. #3

    Default Re: Getting Original Values For Update

    Then I guess the question is how do I use and access a DataTable instead of
    a DataSet in my DataGrid?

    Am I even thinking along the correct lines?

    -- B

    "Stephen Muecke" <stevejo@senet.com.au> wrote in message
    news:%23ZNOjdATDHA.1664@TK2MSFTNGP11.phx.gbl...
    > Bradley,
    >
    > Check out the .HasVersion property of DataRow class
    > You can retreive Original, Current and Proposed values of the
    DataRowVersion
    >
    > Stephen
    >
    > "Bradley M. Small" <BSmall@XNOSPAMXmjsi.com> wrote in message
    > news:ehgLoM8SDHA.1992@TK2MSFTNGP12.phx.gbl...
    > > Hi --
    > >
    > > I am using webmatrix so whatever I try and do is determined by what I
    can
    > do
    > > by hand. That said, I am trying to figure out how to get the original
    > values
    > > for a field that is being edited.
    > >
    > > What I have is a table that had 2 fields in it. Let's say Field1 and
    > Field2.
    > > The key to the table is Field1, Field2 so the ddl would look like this:
    > >
    > > create table MyTable (
    > > Field1 varchar(10) not null
    > > ,Field2 varchar(10) not null
    > > )
    > >
    > > I have created a datagrid to edit it however, if someone changes either
    > > value the update statement needs to know what both the original values
    > were.
    > > I have considered making my select statement get both fields twice and
    > > setting the columns for the second set in the datagrid to not visible,
    but
    > > then I can't seem to figure out how to get the hidden values when
    someone
    > > presses the Update.
    > >
    > > All in all I jus figured that it was getting too involved to be doing it
    > > correctly, so I thought I'd just ask...
    > >
    > > -- Bradley
    > >
    > >
    >
    >

    Bradley M. Small Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139