This topic is locked

numeric question

3/15/2004 12:50:10 AM
ASPRunnerPro General questions
author

Hello,
I have a dumb question about asprunner asp code and displayed numbers. My database contains a numeric field where the values are 100 times greater than I want to display. So if it was to display 3543 it should be 35.43, but I can't change the database itself as its used for another app.
I use asprunner pro to create the display but cant seem to get it to divide the numeric values by 100 without crashing. Can somone be so kind as to help??
Thanks,

Frustrated programmer <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=454&image=1&table=forumtopics' class='bbc_emoticon' alt=':)' />

Sergey Kornilov admin 3/17/2004

here is how you can do this.
Open ..._list.asp file in any text editor and find portion of code that dsiplays this field value. That would be something like this:

<%

if IsBinaryField(rsData.Fields("FieldName")) then

      Response.Write CreateImageControl(rsData, "FieldName", "")

else

      Response.Write ProcessLargeText(GetData(rsData.Fields("FieldName"), ""))

end if

%>


Here is how it should look like:

<%

      Response.Write CLng(GetData(rsData.Fields("FieldName"), ""))/100

%>


I hope this helps.