[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

classic asp math syntax on xml node

Posted on 2009-02-18
5
Medium Priority
?
513 Views
Last Modified: 2012-05-06
this is what I'm trying to do in the code, but I'm shady on the syntax.  
I need to multiple the result by 1.5
<%=node.selectSingleNode("@minQty").text * 1.5 %>

Open in new window

0
Comment
Question by:sl1nger
  • 3
5 Comments
 
LVL 14

Expert Comment

by:B_Dorsey
ID: 23677824
Try

CInt(node.selectSingleNode("@minQty").text) * 1.5
0
 

Author Comment

by:sl1nger
ID: 23686884
I get an 'overflow' error when it trys to convert.  It thought it failed on 50000, but think it's because not set as integer.  How would you do an inline iif to check integer, then convert?



0
 
LVL 14

Accepted Solution

by:
B_Dorsey earned 2000 total points
ID: 23687208
you could do something like

if IsNumeric(node.selectSingleNode("@minQty").text) then

end if

Also Im not sure I forget cause its been a while with XML/ASP ... have you tried it without the .Text or with .value or .nodeValue

If those dont work, then let me know I will go look back at a piece of code or something.
0
 
LVL 14

Expert Comment

by:B_Dorsey
ID: 23687219
or try Int(node.selectSingleNode("@minQty").text) instead
0
 
LVL 28

Expert Comment

by:sybe
ID: 23689428
Integer is Classic ASP can not hold very large numbers, although 50,000 should be no problem. Anyway, I always use Long and not Integer for integers, and sometimes even Double.

Converting to Long goes with Clng() and to Double with Cdbl().

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question