Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

update repeated rows recordset

Status
Not open for further replies.

taoist

Programmer
Joined
Feb 1, 2006
Messages
35
Location
US
I have this recordset it works great. Now I want to create and update query to update all rows in the repeated region


can anyone help me with this issue


<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Request.QueryString("stuRun") <> "") Then
Recordset1__MMColParam = Request.QueryString("stuRun")
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows

Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_cnnDB_STRING
Recordset1.Source = "SELECT * FROM dbo.eval_master WHERE CRN= '" + Replace(Recordset1__MMColParam, "'", "''") + "' AND TERM = '200630'"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()

Recordset1_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = -1
Repeat1__index = 0
Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
 
Perhaps you can write a single UPDATE statement in SQL that describes both the set of records that need to be changed and their new values?
 
do you have a sample snippet
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top