ASP is determining the subtype to be string and concantenating instead of adding
Simply do a cint()/cdbl()/clng() (which ever suites your data) Like foo = cint(num1) + cint(num2) -----Original Message----- From: Alex Elger [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 28, 2002 1:47 AM To: ActiveServerPages Subject: Numbers appearing next to one another instead of being Added Can any one tell me why this piece of code does not do as i intended it to do. The code is: strRecordArrayMin1T = objRS.Getrows strRecordArrayMin1 = strRecordArrayMin1T(0,0) ' Loop around filling the table intMaxCountM1 = ubound(strRecordArrayMin1T,2) For intCounterM1 = 1 to intMaxCountM1 strRecordArrayMin1 = strRecordArrayMin1+strRecordArrayMin1T(0,intCounterM1) next The result is (If there are 2 results both with 3 as the result) currently: 33 I wish for it to show 6 Thanks Alex Elger --- You are currently subscribed to activeserverpages as: [EMAIL PROTECTED] To unsubscribe send a blank email to %%email.unsub%% --- You are currently subscribed to activeserverpages as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED]
