Updating DB from form

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Updating DB from form

    My project is on MSSQL

    Can someone set me on the right track.
    I need to be able to allow users to update
    their profile. Is there a way to display
    their data in form fields, let them make
    their changes and then have only the
    changed fields update ? Or do I have to
    work with each individual field ?

    Thanks,
    Fox


    Fox Guest

  2. Similar Questions and Discussions

    1. updating db from dynamic form variables
      I am having a hard time trying to figure out how to update my database from a form of dynamically populated formfields. I searched around and read...
    2. Updating a single record on a form
      Hi Dennis, You need to look at the properties that begin with 'Allow....'. For example Allow Additions (allows/prevents adding new records). ...
    3. Form updating keyfields
      Further to my earlier post I have simplified the problem with a simple database setup which explains it more clearly I hope. Using Access 2002, I...
    4. Updating via Form to linked tables
      I have a set of linked tables (To Oracle DB) that I need to update via a form. Up to now, I have had pretty straightforward forms that basically...
    5. updating fields in a form
      I am trying to enter a name into a form and have an "invisible" field on the same form automatically updated. Both fields are in the same table. ...
  3. #2

    Default Re: Updating DB from form

    Thanks, guess I was not taking UPDATE literally.
    But just to make sure I understand. When using UPDATE
    the server is checking only for changed data and is not
    rewriting the entire record ?

    Thanks,
    Fox



    "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    news:eo#wynCYDHA.1004@TK2MSFTNGP12.phx.gbl...
    > Yes, of course there is. You create a recordset of the user's data,
    display
    > that data in your form fields, have the form submit to a page that will
    take
    > those values and execute an UPDATE statement on the table using a WHERE
    > clause with the userID.
    >
    > Ray at work
    >
    > "Fox" <fox @ connexions .net> wrote in message
    > news:e5CMhkCYDHA.2476@tk2msftngp13.phx.gbl...
    > > My project is on MSSQL
    > >
    > > Can someone set me on the right track.
    > > I need to be able to allow users to update
    > > their profile. Is there a way to display
    > > their data in form fields, let them make
    > > their changes and then have only the
    > > changed fields update ? Or do I have to
    > > work with each individual field ?
    > >
    > > Thanks,
    > > Fox
    > >
    > >
    >
    >

    Fox Guest

  4. #3

    Default Re: Updating DB from form

    The server wont care what's changed and what hasn't , it'll just set the
    column value for each term you include in the query. However, it won't null
    out (for example) column values not included in the SET clause.

    The solution to your original question is just to update any column for
    which a value comes through in the post from your form. It doesn't matter
    whether the value has changed or not - UPDATEing a column containing an 'A'
    with an 'A' will still leave an 'A'.

    Cheers,

    Alan

    "Fox" <fox @ connexions .net> wrote in message
    news:u2aKY#HYDHA.2152@TK2MSFTNGP09.phx.gbl...
    > Thanks, guess I was not taking UPDATE literally.
    > But just to make sure I understand. When using UPDATE
    > the server is checking only for changed data and is not
    > rewriting the entire record ?
    >
    > Thanks,
    > Fox
    >
    >
    >
    > "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    > news:eo#wynCYDHA.1004@TK2MSFTNGP12.phx.gbl...
    > > Yes, of course there is. You create a recordset of the user's data,
    > display
    > > that data in your form fields, have the form submit to a page that will
    > take
    > > those values and execute an UPDATE statement on the table using a WHERE
    > > clause with the userID.
    > >
    > > Ray at work
    > >
    > > "Fox" <fox @ connexions .net> wrote in message
    > > news:e5CMhkCYDHA.2476@tk2msftngp13.phx.gbl...
    > > > My project is on MSSQL
    > > >
    > > > Can someone set me on the right track.
    > > > I need to be able to allow users to update
    > > > their profile. Is there a way to display
    > > > their data in form fields, let them make
    > > > their changes and then have only the
    > > > changed fields update ? Or do I have to
    > > > work with each individual field ?
    > > >
    > > > Thanks,
    > > > Fox
    > > >
    > > >
    > >
    > >
    >
    >

    Alan 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