S
shank
What is the proper use for CInt ..?
I get a type mismatch error whether I use it or not.
I assumed I needed it because I need to make sure Request("Qty") and
Request("Weight") were integers.
Also, does this loop structure appear to be correct. rsCart recordset is
just above this code.
thanks
<%
If Request("QtyUpdate") <> "" Then
Do While Not rsCart.EOF
varNewQty = CInt(Request("Qty")) <-- Type mismatch error
varNewWeight = varNewQty * CInt((rsCart.Fields.Item("Weight").Value))
Dim DataConn
Set DataConn = Server.CreateObject("ADODB.Connection")
DataConn.Open MM_GenKAccess_STRING
SQL = "UPDATE Cart SET Cart.Qty = '" & varNewQty & "', Cart.Weight = '" &
varNewWeight & "' WHERE Cart.OrderNo = '" & varOrderNo & "'"
DataConn.Execute(SQL)
Loop
Response.Redirect("cart.asp")
End If
%>
I get a type mismatch error whether I use it or not.
I assumed I needed it because I need to make sure Request("Qty") and
Request("Weight") were integers.
Also, does this loop structure appear to be correct. rsCart recordset is
just above this code.
thanks
<%
If Request("QtyUpdate") <> "" Then
Do While Not rsCart.EOF
varNewQty = CInt(Request("Qty")) <-- Type mismatch error
varNewWeight = varNewQty * CInt((rsCart.Fields.Item("Weight").Value))
Dim DataConn
Set DataConn = Server.CreateObject("ADODB.Connection")
DataConn.Open MM_GenKAccess_STRING
SQL = "UPDATE Cart SET Cart.Qty = '" & varNewQty & "', Cart.Weight = '" &
varNewWeight & "' WHERE Cart.OrderNo = '" & varOrderNo & "'"
DataConn.Execute(SQL)
Loop
Response.Redirect("cart.asp")
End If
%>