S
Sparky Arbuckle
I'm trying to calculate the subtotal for each item the customer has in
the shopping cart. objDataReader("decPrice") is the price from my
database field called decPrice. The .8 is for a 20% discount. The
error I get is:
Compiler Error Message: BC30201: Expression expected.
What is the correct syntax for this operation? When I check the
compiler output there is a ~ underneath the &. Any help would be
greatly appreciated.
<!-- CODE SNIPPET -->
Dim strSubTotal as string = 0
Dim i as integer = 0
FOR i = 0 to gtCart.count -1
dim strItemID as string = ds.Tables("tblSCart").rows(i)("ItemID")
ds.Tables("tblSCart").rows(i)("Qty") = gtCart(strItemID)
strSubTotal = .8 * & objDataReader("decPrice")
NEXT
<!-- CODE SNIPPET -->
the shopping cart. objDataReader("decPrice") is the price from my
database field called decPrice. The .8 is for a 20% discount. The
error I get is:
Compiler Error Message: BC30201: Expression expected.
What is the correct syntax for this operation? When I check the
compiler output there is a ~ underneath the &. Any help would be
greatly appreciated.
<!-- CODE SNIPPET -->
Dim strSubTotal as string = 0
Dim i as integer = 0
FOR i = 0 to gtCart.count -1
dim strItemID as string = ds.Tables("tblSCart").rows(i)("ItemID")
ds.Tables("tblSCart").rows(i)("Qty") = gtCart(strItemID)
strSubTotal = .8 * & objDataReader("decPrice")
NEXT
<!-- CODE SNIPPET -->