|
 |
asp_database_setup thread: LOOP THROUGH RECORDSET- - - UPDATE/DELETE
Message #1 by "Angelina Harman" <angelinaq2002@y...> on Fri, 27 Jul 2001 02:46:34
|
|
Dear someone whom may concern,
Is it possible to make an UPDATE and DELETE records/fieldnames
dynamically? My clients want their admins able to update and delete the
records from the web interface without going through the database. I am
thinking of a way of retreving the fieldnames dynamically. It has
something to do with LOOP. And I am very BAD at it.
I'm about to give up on this altogether. Any pointers
on how I can make this simple?? Where do I start? I'm going nowhere
fast! HELP!!
Anything is appreciated, since I have no clue how to do most of
this.
Message #2 by "Ken Schaefer" <ken@a...> on Fri, 27 Jul 2001 12:02:46 +1000
|
|
Yes,
But a DELETE deletes a whole record - you can't just delete an individual
field.
What exactly are you having problems with? Writing out the fields in a
recordset? Or constructing an SQL statement?
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
----- Original Message -----
From: "Angelina Harman" <angelinaq2002@y...>
To: "ASP Database Setup" <asp_database_setup@p...>
Sent: Friday, July 27, 2001 2:46 AM
Subject: [asp_database_setup] LOOP THROUGH RECORDSET- - - UPDATE/DELETE
: Dear someone whom may concern,
:
: Is it possible to make an UPDATE and DELETE records/fieldnames
: dynamically? My clients want their admins able to update and delete the
: records from the web interface without going through the database. I am
: thinking of a way of retreving the fieldnames dynamically. It has
: something to do with LOOP. And I am very BAD at it.
:
: I'm about to give up on this altogether. Any pointers
: on how I can make this simple?? Where do I start? I'm going nowhere
: fast! HELP!!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Message #3 by Eli Schilling <eschilli@t...> on Fri, 27 Jul 2001 07:36:40 -0700
|
|
I used the following code to loop through all the data pulled out in the
query and display it in a table....
RS.absolutepage = pg
recct = 0
Response.Write "Page " & pg & " of " & maxpages & "<br>"
Response.Write "<table border=1><tr>"
//Put headings on the table of field names
For i=0 to RS.fields.count -1
Response.Write "<td><b>" & RS(i).name & "</b></td>"
Next
Response.Write "<tr>"
//Now loop through the data
Do Until RS.eof or recct>=maxrecs
Response.Write "<tr>"
FOR i = 0 to RS.fields.count -1
value = RS(i)
If value & "" = "" THEN value = " "
Response.write "<td valign=top>"
response.write value
response.write "</td>"
next
response.write "<tr>"
RS.movenext
recct=recct+1
LOOP
Response.Write "</table><p>"
-----Original Message-----
From: Angelina Harman [mailto:angelinaq2002@y...]
Sent: Thursday, July 26, 2001 7:47 PM
To: ASP Database Setup
Subject: [asp_database_setup] LOOP THROUGH RECORDSET- - - UPDATE/DELETE
Dear someone whom may concern,
Is it possible to make an UPDATE and DELETE records/fieldnames
dynamically? My clients want their admins able to update and delete the
records from the web interface without going through the database. I am
thinking of a way of retreving the fieldnames dynamically. It has
something to do with LOOP. And I am very BAD at it.
I'm about to give up on this altogether. Any pointers
on how I can make this simple?? Where do I start? I'm going nowhere
fast! HELP!!
Anything is appreciated, since I have no clue how to do most of
this.
---
Message #4 by "Angelina Harman" <angelinaq2002@y...> on Sat, 28 Jul 2001 04:35:28
|
|
THanks but what I need is an UPDATE and DELETE. Any ideas?
> I used the following code to loop through all the data pulled out in the
> query and display it in a table....
>
> RS.absolutepage = pg
>
> recct = 0
> Response.Write "Page " & pg & " of " & maxpages & "<br>"
> Response.Write "<table border=1><tr>"
>
> //Put headings on the table of field names
> For i=0 to RS.fields.count -1
> Response.Write "<td><b>" & RS(i).name & "</b></td>"
> Next
> Response.Write "<tr>"
>
> //Now loop through the data
>
> Do Until RS.eof or recct>=maxrecs
> Response.Write "<tr>"
> FOR i = 0 to RS.fields.count -1
> value = RS(i)
> If value & "" = "" THEN value = " "
> Response.write "<td valign=top>"
> response.write value
> response.write "</td>"
> next
> response.write "<tr>"
> RS.movenext
> recct=recct+1
> LOOP
> Response.Write "</table><p>"
>
> -----Original Message-----
> From: Angelina Harman [mailto:angelinaq2002@y...]
> Sent: Thursday, July 26, 2001 7:47 PM
>
To: ASP Database Setup
> Subject: [asp_database_setup] LOOP THROUGH RECORDSET- - - UPDATE/DELETE
>
>
> Dear someone whom may concern,
>
> Is it possible to make an UPDATE and DELETE records/fieldnames
> dynamically? My clients want their admins able to update and delete the
> records from the web interface without going through the database. I am
> thinking of a way of retreving the fieldnames dynamically. It has
> something to do with LOOP. And I am very BAD at it.
>
> I'm about to give up on this altogether. Any pointers
> on how I can make this simple?? Where do I start? I'm going nowhere
> fast! HELP!!
>
> Anything is appreciated, since I have no clue how to do most of
> this.
> ---
|
|
 |