troubleshooting Question

Something wrong with my VBScript Logic?

Avatar of garethtnash
garethtnashFlag for United Kingdom of Great Britain and Northern Ireland asked on
ASPScripting LanguagesVB Script
6 Comments2 Solutions406 ViewsLast Modified:
Hello Experts, Could you please just pass an inspecting eye over my VBScript statement below;

I've just tried to access the page, but get the following error -

Microsoft VBScript compilation error '800a03ee'
Expected ')'
/direct/editorderitem.asp, line 61
Response.Redirect("/mytgi/direct/editorder.asp?i=&(RSOrderItem.Fields.Item("ID").Value)&")
----------------------------------------------------------------------------^

Heres my code -

<%IF Request("newquantity") < Request("MaxOrder") then
IF Request("newquantity") = 0 then

Dim CMDDeleteOrderItem__ID
CMDDeleteOrderItem__ID = 0
if(Request("OrderLineID") <> "") then CMDDeleteOrderItem__ID = Request("OrderLineID")

set CMDDeleteOrderItem = Server.CreateObject("ADODB.Command")
CMDDeleteOrderItem.ActiveConnection = MM_GolfConnection_STRING
CMDDeleteOrderItem.CommandText = "dbo.usp_AdminDeleteOrderItem"
CMDDeleteOrderItem.CommandType = 4
CMDDeleteOrderItem.CommandTimeout = 0
CMDDeleteOrderItem.Prepared = true
CMDDeleteOrderItem.Parameters.Append CMDDeleteOrderItem.CreateParameter("@RETURN_VALUE", 3, 4)
CMDDeleteOrderItem.Parameters.Append CMDDeleteOrderItem.CreateParameter("@ID", 3, 1,4,CMDDeleteOrderItem__ID)
CMDDeleteOrderItem.Execute()

Response.Redirect("/mytgi/direct/editorder.asp?i=&(RSOrderItem.Fields.Item("ID").Value)&")
Else

Dim CMDUpdateOrderQuantity__ID
CMDUpdateOrderQuantity__ID = 0
if(Request("OrderLineID") <> "") then CMDUpdateOrderQuantity__ID = Request("OrderLineID")

Dim CMDUpdateOrderQuantity__ProductID
CMDUpdateOrderQuantity__ProductID = 0
if(Request("ProductID") <> "") then CMDUpdateOrderQuantity__ProductID = Request("ProductID")

Dim CMDUpdateOrderQuantity__Quantity
CMDUpdateOrderQuantity__Quantity = 0
if(Request("Quantity") <> "") then CMDUpdateOrderQuantity__Quantity = Request("Quantity")

Dim CMDUpdateOrderQuantity__NewQuantity
CMDUpdateOrderQuantity__NewQuantity = 0
if(Request("newquantity") <> "") then CMDUpdateOrderQuantity__NewQuantity = Request("newquantity")

set CMDUpdateOrderQuantity = Server.CreateObject("ADODB.Command")
CMDUpdateOrderQuantity.ActiveConnection = MM_GolfConnection_STRING
CMDUpdateOrderQuantity.CommandText = "dbo.usp_AdminUpdateOrderItem"
CMDUpdateOrderQuantity.CommandType = 4
CMDUpdateOrderQuantity.CommandTimeout = 0
CMDUpdateOrderQuantity.Prepared = true
CMDUpdateOrderQuantity.Parameters.Append CMDUpdateOrderQuantity.CreateParameter("@RETURN_VALUE", 3, 4)
CMDUpdateOrderQuantity.Parameters.Append CMDUpdateOrderQuantity.CreateParameter("@ID", 3, 1,4,CMDUpdateOrderQuantity__ID)
CMDUpdateOrderQuantity.Parameters.Append CMDUpdateOrderQuantity.CreateParameter("@ProductID", 3, 1,4,CMDUpdateOrderQuantity__ProductID)
CMDUpdateOrderQuantity.Parameters.Append CMDUpdateOrderQuantity.CreateParameter("@Quantity", 3, 1,4,CMDUpdateOrderQuantity__Quantity)
CMDUpdateOrderQuantity.Parameters.Append CMDUpdateOrderQuantity.CreateParameter("@NewQuantity", 3, 1,4,CMDUpdateOrderQuantity__NewQuantity)
CMDUpdateOrderQuantity.Execute()

Response.Redirect("/mytgi/direct/editorder.asp?i=&(RSOrderItem.Fields.Item("OrderID").Value)&")
End If
End if%> 

Thanks for your help -
:)
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 2 Answers and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros