T
Thomas J. Brooks, Jr.
Hi there...
I have an ASP page which retrieve all records from a database and displays
in a table in a form. The database has 5 fields and 3 records total. So I
do the following:
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open "DSN=myDSN"
q1="SELECT * FROM [mydata]"
Set RecSet1 = oConn.Execute(q1)
So it displays in a 5 column x 3 row table, with code as follows:
<table>
<tr>
<td>heading1</td>
<td>heading2</td>
<td>heading3</td>
<td>heading4</td>
<td>heading5</td>
</tr>
<%Do While Not RecSet1.eof%>
<tr>
<td><input type=text id=f1 name=f1 value="<%=RecSet1(0)">
<td><input type=text id=f2 name=f2 value="<%=RecSet1(1)">
<td><input type=text id=f3 name=f3 value="<%=RecSet1(2)">
<td><input type=text id=f4 name=f4 value="<%=RecSet1(3)">
<td><input type=text id=f5 name=f5 value="<%=RecSet1(4)">
<%RecSet1.movenext
Loop
RecSet1.close
oConn.Close
%>
</td>
</tr>
</table>
What I'd like to do is to create a bulk editing routine. Because I have the
database contents in text fields, I'd like to be able to edit those values
as necessary and do a bulk UPDATE query, saving all records with any changes
that I've made.
Is this even possible and if so, how would I do it? Would I need to update
one record at a time in the same manner as I populated the table rows?
Thanks
Tom
I have an ASP page which retrieve all records from a database and displays
in a table in a form. The database has 5 fields and 3 records total. So I
do the following:
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open "DSN=myDSN"
q1="SELECT * FROM [mydata]"
Set RecSet1 = oConn.Execute(q1)
So it displays in a 5 column x 3 row table, with code as follows:
<table>
<tr>
<td>heading1</td>
<td>heading2</td>
<td>heading3</td>
<td>heading4</td>
<td>heading5</td>
</tr>
<%Do While Not RecSet1.eof%>
<tr>
<td><input type=text id=f1 name=f1 value="<%=RecSet1(0)">
<td><input type=text id=f2 name=f2 value="<%=RecSet1(1)">
<td><input type=text id=f3 name=f3 value="<%=RecSet1(2)">
<td><input type=text id=f4 name=f4 value="<%=RecSet1(3)">
<td><input type=text id=f5 name=f5 value="<%=RecSet1(4)">
<%RecSet1.movenext
Loop
RecSet1.close
oConn.Close
%>
</td>
</tr>
</table>
What I'd like to do is to create a bulk editing routine. Because I have the
database contents in text fields, I'd like to be able to edit those values
as necessary and do a bulk UPDATE query, saving all records with any changes
that I've made.
Is this even possible and if so, how would I do it? Would I need to update
one record at a time in the same manner as I populated the table rows?
Thanks
Tom