|
-
Jun 22nd, 2003, 10:13 AM
#1
Thread Starter
Junior Member
Addition operation in VB Script.
Hi,
I have to perform an addition operation of these variables. The variables look like this:
var1 = TRIM(CSTR(objRs.Fields
("var1").Value)) the value is 6
var2 = TRIM(CSTR(objRs.Fields
("var2").Value)) the value is 1
I want the result to be 6+1 as 7
but when I try to compute this I used
total = var1 + var2 and my total shows as 16 which is the string concatenation. How do I change this string to be an integer?
ANy pointers will be great.
Thanks
Sri
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|