I have MySQL 3.23.53-max-nt, MyODBC 2.50.39 running on win2k server sp2 and iis 5.0. The VBScript below works on MS Sql server, but sets the 'approved' column to 'no' for all rows on MySQL. Any ideas? Thanks.
While CInt(ctr)<CInt(Request.Form("ctr")
linid=CInt(Request.Form("LineID"&ctr))
strSQL="SELECT Approved FROM PORequest WHERE RecordID="&recid&" And LineID='"&linid&"'"
objRS.Open strSQL,objConn,1,2
If objRS("Approved"<>"pending" Then Response.Redirect "../logout.asp?s=13"
If Request.Form("approved"&ctr)="yes" Then
objRS.Fields("Approved"="yes"
Else
If Request.Form("approved"&ctr)="no" Then
objRS.Fields("Approved"="no"
End If
End If
objRS.Update
ctr=ctr+1
Wend
While CInt(ctr)<CInt(Request.Form("ctr")
linid=CInt(Request.Form("LineID"&ctr))
strSQL="SELECT Approved FROM PORequest WHERE RecordID="&recid&" And LineID='"&linid&"'"
objRS.Open strSQL,objConn,1,2
If objRS("Approved"<>"pending" Then Response.Redirect "../logout.asp?s=13"
If Request.Form("approved"&ctr)="yes" Then
objRS.Fields("Approved"="yes"
Else
If Request.Form("approved"&ctr)="no" Then
objRS.Fields("Approved"="no"
End If
End If
objRS.Update
ctr=ctr+1
Wend