By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,637 Members | 1,967 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,637 IT Pros & Developers. It's quick & easy.

Set a Field of Recordset to be editable

P: n/a
ANC
hi,

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

ANC
Jul 19 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
Do not use an adLockReadOnly locktype.

Cheers
Ken

"ANC" <an*******@hotmail.com> wrote in message
news:eV**************@tk2msftngp13.phx.gbl...
: hi,
:
: i would like to ask how can i set a field of recordset to be editable?
: thanks in advance.
:
: ANC
:
:
Jul 19 '05 #2

P: n/a
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" <an*******@hotmail.com> wrote in message
news:eV**************@tk2msftngp13.phx.gbl...
: hi,
:
: i would like to ask how can i set a field of recordset to be editable?: thanks in advance.
:
: ANC
:
:
.

Jul 19 '05 #3

P: n/a
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" <gi***@geewhiz.com> wrote in message
news:02****************************@phx.gbl...
: 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" <an*******@hotmail.com> wrote in message
: >news:eV**************@tk2msftngp13.phx.gbl...
: >: hi,
: >:
: >: i would like to ask how can i set a field of recordset
: to be editable?
: >: thanks in advance.
: >:
: >: ANC
Jul 19 '05 #4

P: n/a
ANC
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" <ke*******@THISadOpenStatic.com> 在郵件
news:uT**************@TK2MSFTNGP12.phx.gbl 中撰寫...
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" <gi***@geewhiz.com> wrote in message
news:02****************************@phx.gbl...
: 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" <an*******@hotmail.com> wrote in message
: >news:eV**************@tk2msftngp13.phx.gbl...
: >: hi,
: >:
: >: i would like to ask how can i set a field of recordset
: to be editable?
: >: thanks in advance.
: >:
: >: ANC

Jul 19 '05 #5

P: n/a
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 fieldon the table.

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

or is it possible to do this?!

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

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

Anthea

"Ken Schaefer" <ke*******@THISadOpenStatic.com> 在郵件
news:uT**************@TK2MSFTNGP12.phx.gbl 中撰寫...
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" <gi***@geewhiz.com> wrote in message
news:02****************************@phx.gbl...
: 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" <an*******@hotmail.com> wrote in message
: >news:eV**************@tk2msftngp13.phx.gbl...
: >: hi,
: >:
: >: i would like to ask how can i set a field of recordset : to be editable?
: >: thanks in advance.
: >:
: >: ANC

.

Jul 19 '05 #6

P: n/a
ANC
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" <gi***@geewhiz.com> ???
news:07****************************@phx.gbl ???...
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 fieldon the table.

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

or is it possible to do this?!

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

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

Anthea

"Ken Schaefer" <ke*******@THISadOpenStatic.com> 在郵件
news:uT**************@TK2MSFTNGP12.phx.gbl 中撰寫...
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" <gi***@geewhiz.com> wrote in message
news:02****************************@phx.gbl...
: 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" <an*******@hotmail.com> wrote in message
: >news:eV**************@tk2msftngp13.phx.gbl...
: >: hi,
: >:
: >: i would like to ask how can i set a field of recordset : to be editable?
: >: thanks in advance.
: >:
: >: ANC

.

Jul 19 '05 #7

P: n/a
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 fieldon 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


Jul 19 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.