wall85: Die Seite kann nicht angezeigt werden

Beitrag lesen

ich hab ein problem..

in dem folgenden skript müsste ein fehler sein, nur find ich ihn nicht, könnt ihr einmal reinschauen?
es wird der wert für command, "insert", übergeben!

...
<%
command = Request.QueryString("command")
itemid = Request.QueryString("itemid")
orderid = Request.QueryString("orderid")
pieces = Request.Form("pieces")

if isNull(userid) or userid="" then
 userid = "0"
end if

if command = "delete" then
 q = "delete from orders"
 q = q & " where order_id = " & orderid
 RS.Open q, nameConn

else
 if command = "change" then
  if pieces="0" then
  q = "delete from orders"
  q = q & " where order_id = " & orderid
  else
  q = "update orders set pieces = " & pieces
  q = q & " where order_id = " & orderid
  end if
RS.Open q, nameConn

q = "update orders set sum_order = "
q = q & "(Select price from item where item_id = " & itemid
q = q & ")*" & pieces
q = q & " where order_id = " & orderid
RS.Open q, nameConn

else
  if command = "insert" then
   q = "Select order_id,pieces from orders "
   q = q & " where session_id = " & "'" & sessionid & "'"
   q = q & " and item_id = " & "'" & itemid & "'"
   RS.Open q, nameConn
   if not isnull(RS("order_id")) then
    pieces = pieces + RS("pieces")
    q = "update orders set sum_order = "
    q = q & "(Select price from item where item_id =" & itemid
    q = q & ")*" & pieces
    q = q & " where order_id = " & orderid
    RS.Open q, nameConn
    q = "update orders set pieces = " & pieces
    q = q & " where order_id = " & orderid
    RS.Open q, nameConn
   else
    q = "Select price from item where item_id = " & itemid
    RS.Open q, nameConn
    order_price = Replace(RS("price")*pieces,",",".")
    RS.Close
    q = "insert into orders (session_id,item_id,user_id,order_date,pieces,sum_order) "
    q = q & "Values (" & "'" & sessionid & "'"
    q = q & "," & itemid & "," & userid & ", GetDate()"
    q = q & "," & pieces & "," & order_price & ")"
    RS.Open q, nameConn
   end if
  end if
 end if
end if
%>...