Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Set a Field of Recordset to be editable

Reply
Thread Tools

Set a Field of Recordset to be editable

 
 
ANC
Guest
Posts: n/a
 
      12-10-2003
hi,

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

ANC


 
Reply With Quote
 
 
 
 
Ken Schaefer
Guest
Posts: n/a
 
      12-10-2003
Do not use an adLockReadOnly locktype.

Cheers
Ken

"ANC" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
: hi,
:
: i would like to ask how can i set a field of recordset to be editable?
: thanks in advance.
:
: ANC
:
:


 
Reply With Quote
 
 
 
 
John Beschler
Guest
Posts: n/a
 
      12-10-2003
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" <(E-Mail Removed)> wrote in message
>news:(E-Mail Removed)...
>: hi,
>:
>: i would like to ask how can i set a field of recordset

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

 
Reply With Quote
 
Ken Schaefer
Guest
Posts: n/a
 
      12-11-2003
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" <(E-Mail Removed)> wrote in message
news:02e501c3bf61$7982e420$(E-Mail Removed)...
: 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" <(E-Mail Removed)> wrote in message
: >news:(E-Mail Removed)...
: >: hi,
: >:
: >: i would like to ask how can i set a field of recordset
: to be editable?
: >: thanks in advance.
: >:
: >: ANC


 
Reply With Quote
 
ANC
Guest
Posts: n/a
 
      12-11-2003
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" <(E-Mail Removed)> 在郵件
news:(E-Mail Removed) 中撰寫...
> 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" <(E-Mail Removed)> wrote in message
> news:02e501c3bf61$7982e420$(E-Mail Removed)...
> : 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" <(E-Mail Removed)> wrote in message
> : >news:(E-Mail Removed)...
> : >: hi,
> : >:
> : >: i would like to ask how can i set a field of recordset
> : to be editable?
> : >: thanks in advance.
> : >:
> : >: ANC
>
>



 
Reply With Quote
 
John Beschler
Guest
Posts: n/a
 
      12-11-2003
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" <(E-Mail Removed)> 在郵件
>news:(E-Mail Removed) 中撰寫...
>> 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" <(E-Mail Removed)> wrote in message
>> news:02e501c3bf61$7982e420$(E-Mail Removed)...
>> : 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" <(E-Mail Removed)> wrote in message
>> : >news:(E-Mail Removed)...
>> : >: hi,
>> : >:
>> : >: i would like to ask how can i set a field of

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

>
>
>.
>

 
Reply With Quote
 
ANC
Guest
Posts: n/a
 
      12-12-2003
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" <(E-Mail Removed)> ???
news:07d801c3bff8$e59d6d00$(E-Mail Removed) ???...
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" <(E-Mail Removed)> 在郵件
>news:(E-Mail Removed) 中撰寫...
>> 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" <(E-Mail Removed)> wrote in message
>> news:02e501c3bf61$7982e420$(E-Mail Removed)...
>> : 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" <(E-Mail Removed)> wrote in message
>> : >news:(E-Mail Removed)...
>> : >: hi,
>> : >:
>> : >: i would like to ask how can i set a field of

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

>
>
>.
>



 
Reply With Quote
 
John Beschler
Guest
Posts: n/a
 
      12-12-2003
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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
javascript validation for a not required field, field is onlyrequired if another field has a value jr Javascript 3 07-08-2010 10:33 AM
1.Enter space bar for field names and save the field.The field shoud not get saved and an alert should be there as"Space bars are not allowed" Sound Javascript 2 09-28-2006 02:43 PM
Templated Field in an Editable GridView Problem Frank ASP .Net 0 09-19-2006 08:15 PM
Editable Datagrid - getting date field Child ASP .Net 0 01-22-2004 06:09 PM
RecordSet.Move or RecordSet.AbsolutePosition?? Hung Huynh ASP General 8 09-24-2003 11:07 AM



Advertisments