Set a Field of Recordset to be editable

Discussion in 'ASP General' started by ANC, Dec 10, 2003.

  1. ANC

    ANC Guest

    hi,

    i would like to ask how can i set a field of recordset to be editable?
    thanks in advance.

    ANC
    ANC, Dec 10, 2003
    #1
    1. Advertising

  2. ANC

    Ken Schaefer Guest

    Do not use an adLockReadOnly locktype.

    Cheers
    Ken

    "ANC" <> wrote in message
    news:...
    : hi,
    :
    : i would like to ask how can i set a field of recordset to be editable?
    : thanks in advance.
    :
    : ANC
    :
    :
    Ken Schaefer, Dec 10, 2003
    #2
    1. Advertising

  3. I'm surprised nobody else here has brought this up: You
    shouldn't!

    Assuming you are using SQL or Access, you should update
    your data with an SQL UPDATE statement.


    IE

    UPDATE MYTable SET MyTextField = 'somevalue',
    MyNumberField = somenumber
    WHERE MyKey = SomeKeyValue

    HTH,
    John



    >-----Original Message-----
    >Do not use an adLockReadOnly locktype.
    >
    >Cheers
    >Ken
    >
    >"ANC" <> wrote in message
    >news:...
    >: hi,
    >:
    >: i would like to ask how can i set a field of recordset

    to be editable?
    >: thanks in advance.
    >:
    >: ANC
    >:
    >:
    >
    >
    >.
    >
    John Beschler, Dec 10, 2003
    #3
  4. ANC

    Ken Schaefer Guest

    A recordset could be, for example, disconnected from the database - using an
    UPDATE statement in such a case is pointless.

    I suppose we just don't know what the OP is trying to do!

    Cheers
    Ken

    "John Beschler" <> wrote in message
    news:02e501c3bf61$7982e420$...
    : I'm surprised nobody else here has brought this up: You
    : shouldn't!
    :
    : Assuming you are using SQL or Access, you should update
    : your data with an SQL UPDATE statement.
    :
    :
    : IE
    :
    : UPDATE MYTable SET MyTextField = 'somevalue',
    : MyNumberField = somenumber
    : WHERE MyKey = SomeKeyValue
    :
    : HTH,
    : John
    :
    :
    :
    : >-----Original Message-----
    : >Do not use an adLockReadOnly locktype.
    : >
    : >Cheers
    : >Ken
    : >
    : >"ANC" <> wrote in message
    : >news:...
    : >: hi,
    : >:
    : >: i would like to ask how can i set a field of recordset
    : to be editable?
    : >: thanks in advance.
    : >:
    : >: ANC
    Ken Schaefer, Dec 11, 2003
    #4
  5. ANC

    ANC Guest

    ken, thanks for the advice.



    Maybe i'm not making clear to my question, sorry about that.



    I created a recordset and put it in a table. User can edit some of the field
    on the table.

    however, my table is all protected, i don't know how to make it editable by
    user.

    or is it possible to do this?!



    John, please read the question carefully even u're trying to solve my
    problem,

    of coz i'm not asking how to write the update script with sql statement.



    Thanks,

    Anthea



    "Ken Schaefer" <> ¦b¶l¥ó
    news: ¤¤¼¶¼g...
    > A recordset could be, for example, disconnected from the database - using

    an
    > UPDATE statement in such a case is pointless.
    >
    > I suppose we just don't know what the OP is trying to do!
    >
    > Cheers
    > Ken
    >
    > "John Beschler" <> wrote in message
    > news:02e501c3bf61$7982e420$...
    > : I'm surprised nobody else here has brought this up: You
    > : shouldn't!
    > :
    > : Assuming you are using SQL or Access, you should update
    > : your data with an SQL UPDATE statement.
    > :
    > :
    > : IE
    > :
    > : UPDATE MYTable SET MyTextField = 'somevalue',
    > : MyNumberField = somenumber
    > : WHERE MyKey = SomeKeyValue
    > :
    > : HTH,
    > : John
    > :
    > :
    > :
    > : >-----Original Message-----
    > : >Do not use an adLockReadOnly locktype.
    > : >
    > : >Cheers
    > : >Ken
    > : >
    > : >"ANC" <> wrote in message
    > : >news:...
    > : >: hi,
    > : >:
    > : >: i would like to ask how can i set a field of recordset
    > : to be editable?
    > : >: thanks in advance.
    > : >:
    > : >: ANC
    >
    >
    ANC, Dec 11, 2003
    #5
  6. OK, Now I'm really confused. When you say "I created a
    recordset and put it in a table." Do you mean an HTML
    table in your web page, or a table in your database?

    If you mean an HTML table in your web page, then you would
    have to replace the values in your table with input tags
    and process the page accordingly.

    If you mean a table in your database, then you need to let
    us know which database you are using (MS-SQL, MS-Access,
    mySql, Oracle, etc.)

    HTH,
    John

    >-----Original Message-----
    >ken, thanks for the advice.
    >
    >
    >
    >Maybe i'm not making clear to my question, sorry about

    that.
    >
    >
    >
    >I created a recordset and put it in a table. User can

    edit some of the field
    >on the table.
    >
    >however, my table is all protected, i don't know how to

    make it editable by
    >user.
    >
    >or is it possible to do this?!
    >
    >
    >
    >John, please read the question carefully even u're trying

    to solve my
    >problem,
    >
    >of coz i'm not asking how to write the update script with

    sql statement.
    >
    >
    >
    >Thanks,
    >
    >Anthea
    >
    >
    >
    >"Ken Schaefer" <> ¦b¶l¥ó
    >news: ¤¤¼¶¼g...
    >> A recordset could be, for example, disconnected from

    the database - using
    >an
    >> UPDATE statement in such a case is pointless.
    >>
    >> I suppose we just don't know what the OP is trying to

    do!
    >>
    >> Cheers
    >> Ken
    >>
    >> "John Beschler" <> wrote in message
    >> news:02e501c3bf61$7982e420$...
    >> : I'm surprised nobody else here has brought this up:

    You
    >> : shouldn't!
    >> :
    >> : Assuming you are using SQL or Access, you should

    update
    >> : your data with an SQL UPDATE statement.
    >> :
    >> :
    >> : IE
    >> :
    >> : UPDATE MYTable SET MyTextField = 'somevalue',
    >> : MyNumberField = somenumber
    >> : WHERE MyKey = SomeKeyValue
    >> :
    >> : HTH,
    >> : John
    >> :
    >> :
    >> :
    >> : >-----Original Message-----
    >> : >Do not use an adLockReadOnly locktype.
    >> : >
    >> : >Cheers
    >> : >Ken
    >> : >
    >> : >"ANC" <> wrote in message
    >> : >news:...
    >> : >: hi,
    >> : >:
    >> : >: i would like to ask how can i set a field of

    recordset
    >> : to be editable?
    >> : >: thanks in advance.
    >> : >:
    >> : >: ANC
    >>
    >>

    >
    >
    >.
    >
    John Beschler, Dec 11, 2003
    #6
  7. ANC

    ANC Guest

    the recordset is put into an HTML table and user can edit some of the field
    on the web, and they press submit button,
    then i will update the data by script.
    but now i can't make my HTML table to be editable.

    Thanks for reading my problem.

    Anthea

    "John Beschler" <> ???
    news:07d801c3bff8$e59d6d00$ ???...
    OK, Now I'm really confused. When you say "I created a
    recordset and put it in a table." Do you mean an HTML
    table in your web page, or a table in your database?

    If you mean an HTML table in your web page, then you would
    have to replace the values in your table with input tags
    and process the page accordingly.

    If you mean a table in your database, then you need to let
    us know which database you are using (MS-SQL, MS-Access,
    mySql, Oracle, etc.)

    HTH,
    John

    >-----Original Message-----
    >ken, thanks for the advice.
    >
    >
    >
    >Maybe i'm not making clear to my question, sorry about

    that.
    >
    >
    >
    >I created a recordset and put it in a table. User can

    edit some of the field
    >on the table.
    >
    >however, my table is all protected, i don't know how to

    make it editable by
    >user.
    >
    >or is it possible to do this?!
    >
    >
    >
    >John, please read the question carefully even u're trying

    to solve my
    >problem,
    >
    >of coz i'm not asking how to write the update script with

    sql statement.
    >
    >
    >
    >Thanks,
    >
    >Anthea
    >
    >
    >
    >"Ken Schaefer" <> ¦b¶l¥ó
    >news: ¤¤¼¶¼g...
    >> A recordset could be, for example, disconnected from

    the database - using
    >an
    >> UPDATE statement in such a case is pointless.
    >>
    >> I suppose we just don't know what the OP is trying to

    do!
    >>
    >> Cheers
    >> Ken
    >>
    >> "John Beschler" <> wrote in message
    >> news:02e501c3bf61$7982e420$...
    >> : I'm surprised nobody else here has brought this up:

    You
    >> : shouldn't!
    >> :
    >> : Assuming you are using SQL or Access, you should

    update
    >> : your data with an SQL UPDATE statement.
    >> :
    >> :
    >> : IE
    >> :
    >> : UPDATE MYTable SET MyTextField = 'somevalue',
    >> : MyNumberField = somenumber
    >> : WHERE MyKey = SomeKeyValue
    >> :
    >> : HTH,
    >> : John
    >> :
    >> :
    >> :
    >> : >-----Original Message-----
    >> : >Do not use an adLockReadOnly locktype.
    >> : >
    >> : >Cheers
    >> : >Ken
    >> : >
    >> : >"ANC" <> wrote in message
    >> : >news:...
    >> : >: hi,
    >> : >:
    >> : >: i would like to ask how can i set a field of

    recordset
    >> : to be editable?
    >> : >: thanks in advance.
    >> : >:
    >> : >: ANC
    >>
    >>

    >
    >
    >.
    >
    ANC, Dec 12, 2003
    #7
  8. So what you have is:
    <table>
    <tr>
    <td>Data from my field 1</td>
    </tr>
    <tr>
    <td>Data from my field 2</td>
    </tr>
    ....
    </table>

    Is this correct? And you want to be able to edit that data?

    Then you would need something like this:

    <form name=myform action=update.asp method=post>


    <table>
    <tr>
    <td><input type=text name=txtfield1 value="Data from my
    field 1"></td>
    </tr>
    <tr>
    <td><input type=text name=txtfield2 value="Data from my
    field 2"></td>
    </tr>
    <tr>
    <td>
    <input type=submit value="Submit">
    </td>
    </tr>
    ....
    </table>
    </form>

    Then, you have to write the code for update.asp to process
    the data when it gets back to the server.


    >-----Original Message-----
    >the recordset is put into an HTML table and user can

    edit some of the field
    >on the web, and they press submit button,
    >then i will update the data by script.
    >but now i can't make my HTML table to be editable.
    >
    >Thanks for reading my problem.
    >
    >Anthea
    John Beschler, Dec 12, 2003
    #8
    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. Child
    Replies:
    0
    Views:
    337
    Child
    Jan 22, 2004
  2. Frank
    Replies:
    0
    Views:
    1,097
    Frank
    Sep 19, 2006
  3. Hung Huynh
    Replies:
    8
    Views:
    289
    Bob Barrows
    Sep 24, 2003
  4. Sound
    Replies:
    2
    Views:
    428
    Randy Webb
    Sep 28, 2006
  5. jr
    Replies:
    3
    Views:
    405
Loading...

Share This Page