Forum Home Forum Home > Legacy Products > SalesCart Standard / PRO / SQL
  New Posts New Posts RSS Feed - another shipping2.asp code question
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Forum Lockedanother shipping2.asp code question

 Post Reply Post Reply
Author
Message Reverse Sort Order
lleemon View Drop Down
Groupie
Groupie


Joined: March/16/04
Location: United States
Status: Offline
Points: 41
Post Options Post Options   Thanks (0) Thanks(0)   Quote lleemon Quote  Post ReplyReply Direct Link To This Post Topic: another shipping2.asp code question
    Posted: October/17/05 at 9:45am
Looking at shipping2.asp code it looks like a section is populated with data but then all the values are set to 0. Do I just have a bad file or are there good reasons for doing/having code like this:


Dim SimpleAdo, rstRS, SQLStmt

     SQLStmt = "SELECT * FROM [order] "
     SQLStmt = SQLStmt & "WHERE orderid=" & order & ";"
     Set SimpleAdo = New CSimpleAdo
     SimpleAdo.setConnectionString = Session("ConnectionString")
     Set RS = SimpleAdo.getRecordSet(SQLStmt)

If CheckRS(RS) Then
     subtotal = RS("subtotal")
     subhand = RS("subhand")
     subship = RS("subship")
End If

     Set SimpleAdo = Nothing
     Set RS = Nothing


'''''''''''''''''''''''''''''''''''''''''''''''
     'thedate = Cstr(Date)        &n bsp; 
     'thetime = Cstr(Time)        &n bsp; 

     subtotal = 0           ;           ;
     subweight = 0           ;           ;
     subsize = 0           ;           ;
     subquantity = 0           ;     
     subship = 0           ;           ;
     subhand = 0           ;           ;

     SQLStmt = "SELECT * From item "
     SQLStmt = SQLStmt & "WHERE [Orderid] =" & Order & "; "

     Set SimpleAdo = New CSimpleAdo
     SimpleAdo.setConnectionString = Session("ConnectionString")
     Set RS = SimpleAdo.getRecordSet(SQLStmt)



You will see in the code above that the following variables (subtotal, subhand, subship) are populated from recordset RS but then set to 0 before items from the item table is formed.

Thanks in advance for the info.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.04
Copyright ©2001-2015 Web Wiz Ltd.

Copyright 2015 by ComCity® LLC and SalesCart™.  All Rights Reserved