Hello All,
So, I have a small problem with an asp page I have, I am trying to update an access backend from an asp page. For some reason it doesn't seem to know which cell in the table should be updated though the where clause should be working???
Here are the elements that I've used in my page:
<%
dim rsdeposited, rsDeposited_Uprovcreddate
set rsdeposited = Server.CreateObject("ADODB.RecordSet")
set rsDeposited_Uprovcreddate = Server.CreateObject("ADODB.RecordSet")
strSQL = "SELECT tblPaidAmounts.PaidID, tblPaidAmounts.PaidDate," & _
"tblPaidAmounts.Branch, branch.branch AS Branch, tblPaidAmounts.Collect, tblPaidAmounts.Discount," & _
"[collect]-[discount] AS AfterDiscount, tblPaidAmounts.ExpAmt, tblPaidAmounts.DepositAmount " & _
"FROM tblPaidAmounts INNER JOIN tblbranches AS Branch ON branch.branchid = tblpaidamounts.branch " & _
"WHERE tblpaidamounts.Branch = " & Branchid
rsdeposited.Open strSQL, oConn, 1, 3
if Request.Form <> "" then
rsDeposited_Uprovcreddate.Open "SELECT paidID, paiddate, branch, collect, discount, expamt, Depositamount FROM tblpaidamounts", oConn, 2, 3
do while not rsDeposited_Uprovcreddate.EOF
oConn.Execute "UPDATE tblpaidamounts SET Depositamount = " & Request.Form("depositamount" & rsDeposited_Uprovcreddate("paidID")) & " WHERE paidID = " & rsDeposited_Uprovcreddate("paidID")
rsDeposited_Uprovcreddate.MoveNext
loop
rsDeposited_Uprovcreddate.Close : set rsDeposited_Uprovcreddate = nothing
end if
rsdeposited.Requery
'''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''
if not rsdeposited.EOF then
dim tempArray : tempArray = rsdeposited.GetRows()
intRowCount = UBound(tempArray , 2) + 1
rsdeposited.Requery
rsdeposited.Move(intStart - 1)
else
intRowCount = 0
end if
intPages = Pages(intRowCount, intPage_Per_Count)
'''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''
%>
<td class="td_results"><input type="integer" maxlength="6" id="depositamount<%=rsdeposited("paidID")%>" name="depositamount<%=rsdeposited("paidID")%>" border="0" value="<%=rsdeposited("depositamount")%>"></td>
<%rsdeposited.MoveNext
end if
next%>
Any Ideas??
I have attached the source file, too, thanks in advance by the way