Print Page | Close Window

another shipping2.asp code question

Printed From: SalesCart
Category: Legacy Products
Forum Name: SalesCart Standard / PRO / SQL
Forum Description: All questions pertaining to SalesCart Standard, PRO and SQL should be posted here.
URL: http://forum.salescart.com/forum/forum_posts.asp?TID=465
Printed Date: April/25/24 at 5:55am
Software Version: Web Wiz Forums 11.04 - http://www.webwizforums.com


Topic: another shipping2.asp code question
Posted By: lleemon
Subject: another shipping2.asp code question
Date 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.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.04 - http://www.webwizforums.com
Copyright ©2001-2015 Web Wiz Ltd. - http://www.webwiz.co.uk