I have a site where the user builds a batch of data with a total for the batch of
rs("totalbatch")
once they have completed the batch they process that batch
and the system asigns a new session batch number. my prblem here is the rs("totalbatch") returns NULL and this throws out errors, usually Type Mismatch errors or invaliduse of NULL
Essentially rs("totalbatch") can be either Null or a value to two decimal places. What I want to do is say that
s="SELECT SUM(loanvalue) AS totalbatch FROM dbo.tbl_balance WHERE (batchID = "&session("batchno")&")"
set rs=db.execute(s)
if rs("totalbatch") IS NULL then
batchno = 0
else
batchno = rs("totalbatch")
end if
but making sure there is no rounding up as it is money. So for the second, third etc loans in the batch the rs("totalbatch") returns a number (it must be in numeric form to two decimal places)
rs("totalbatch")
once they have completed the batch they process that batch
and the system asigns a new session batch number. my prblem here is the rs("totalbatch") returns NULL and this throws out errors, usually Type Mismatch errors or invaliduse of NULL
Essentially rs("totalbatch") can be either Null or a value to two decimal places. What I want to do is say that
s="SELECT SUM(loanvalue) AS totalbatch FROM dbo.tbl_balance WHERE (batchID = "&session("batchno")&")"
set rs=db.execute(s)
if rs("totalbatch") IS NULL then
batchno = 0
else
batchno = rs("totalbatch")
end if
but making sure there is no rounding up as it is money. So for the second, third etc loans in the batch the rs("totalbatch") returns a number (it must be in numeric form to two decimal places)