The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> decimal place error, Classic ASP and Access database
Pluribus
post Apr 18 2012, 08:43 AM
Post #1


Member
***

Group: Members
Posts: 81
Joined: 6-February 09
Member No.: 7,737



Hi

I have a problem with my decimal places on my classic asp page. Basically, any price with a 0 on the end, ie 5.10 is displayed without the final 0. Any other number is fine, ie 5.19 displays as 5.19. Can anyone help?

Page code is below, live page is : http://www.iandwilliams.com/sites/cmc/agri...tion.asp?id=510

CODE
<%@ Language=VBScript%>
<%
Response.Expires = -1
id=request.QueryString("id")
pa_qs=request.QueryString("pa")

pa=1 ' Default U.K.

pa_c=request.Cookies("pa")

if pa_c<>"" then pa=cint(pa_c)


if pa_qs<>"" then
pa=cint(pa_qs)
response.Cookies("pa")=pa
end if



Carriage_col=""

select case pa
    case 1
        Carriage_col="United Kingdom"
    case 2
        Carriage_col="Europe"
    case 3
        Carriage_col="Rest of World"
    case else
        response.Status="404 Not Found"
        response.End()
end select

if id="" or isnumeric(id)=0 then
    response.Status="404 Not Found"
    response.End()
end if

Set adoCon = Server.CreateObject("ADODB.connection")' initialize connection
Set rs = Server.CreateObject("ADODB.RecordSet")' initialize record set
adoCon.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("stock details.mdb")

strSQL = "Select * from StockDetails WHERE id="&id
rs.open strSQL,adoCon,1,1  'open record set
if not rs.eof then
    model=rs("Model")
    product_desc=rs("Description")
    product_desc1=rs("Description1")
    product_desc2=rs("Description2")
    product_desc3=rs("Description3")
    product_desc4=rs("Description4")
    product_desc5=rs("Description5")
    product_desc6=rs("Description6")
    product_desc7=rs("Description7")
    product_desc8=rs("Description8")
    product_other_desc=rs("DescriptionExtra")
    pic_main=rs("Picture")
    lawnsize=rs("LawnSize")
    height=rs("Height")
    width=rs("Width")
    length=rs("Length")
    weight=rs("Weight")
    stripes=rs("Stripes")
    roughlawns=rs("RoughLawns")
    finelawns=rs("FineLawns")
    cuttingwidth=rs("CuttingWidth")
    cuttingheight=rs("CuttingHeight")
    grassbagcapacity=rs("GrassBagCapacity")
    powerunit=rs("PowerUnit")
    powersource=rs("PowerSource")
    price=rs("Total Retail")
    carriage=rs("Carriage")
    if carriage="" or isnull(carriage) then carriage=0
    total_price=price+carriage
else
    response.Status="404 Not Found"
    response.End()end if
rs.close
adoCon.close
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head id="Head1"><title>AgriFab products from Country Mower Centre</title>
    <link href="../css/master.css" rel="stylesheet" type="text/css" />
    <link href="../css/menu.css" rel="stylesheet" type="text/css" />
    <link href="../css/content.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" language="javascript" src="../js/jquery.js"></script>
    <script type="text/javascript" language="javascript" src="../js/swfobject.js"></script>
</head>

<body>
    <div class="shadow">
        <div class="container">
        <img src="../images/logo.png" border="0" usemap="#Map" sr="../images/logo.png" />
        <map name="Map" id="Map">
          <area shape="rect" coords="752,7,943,72" href="http://www.countrymowercentre.co.uk" target="_blank" />
        </map>
        <script type="text/javascript">
                var so = new SWFObject("../flash/af_home.swf", "mymovie", "950", "507", "8", "#ce7019");
                //so.setAttribute('redirectUrl','/getFlash.aspx')
                so.addParam("wmode", "transparent");
                so.useExpressInstall('../flash/af_homeinstall.swf');
                so.write("flashHeader");                
            </script>

            

<script language="javascript" type="text/javascript">
    $(document).ready(function() {
        if (document.URL.indexOf('../type/index.htm', 0) > -1)
        {
            $("#" + "type_menu").slideDown("fast");
        }
        else
        {
            if (document.URL.indexOf('../task/index.htm', 0) > -1)
            {
                $("#" + "task_menu").slideDown("fast");
            }
            else
            {
                $("#" + getCurrentSection() + "_menu").slideDown("fast");
            }
        }        
        
        $(".expand_menu a").click(function() {
            $("dd:visible").slideUp("slow");
            $(this).parent().next().slideDown("slow");
            return false;
        });
    });
        
        function getCurrentSection(){
            var strLoc = location.pathname;
            strLoc = strLoc.replace('../agri_fab_web/index.htm', '');
            //alert(strLoc);
            strLoc = strLoc.substring(strLoc.indexOf("../index.htm")+1);
            //alert(strLoc);
            strLoc = strLoc.substr(0, strLoc.indexOf("../index.htm"));
            //alert(strLoc);
            
//            if (strLoc == "" || strLoc == "site") {
//                strLoc = "type";
//            }
            //alert(strLoc);
            
            return strLoc;
        }
</script>

<div class="default_menu">
    <div class="menu_shadow1">
        <div class="menu_shadow2">
            <div class="menu_shadow3">
                <div class="menu_background">
                    <div class="menu_lowerGradiant">
                      <div class='menuItems'>
                        <div class='menu_section'><span class='menu_title'>FIND A PRODUCT</span>
                          <dl>
                            <dt class='expand_menu menu_item' id='expand_type_menu'><a href='#' class='menu_link' onfocus='blur();'>Search by type</a></dt></dl>
                          <dl>
                            <dd id='../type_menu' style='display:block'>
                              <ul class='tree' id='category_tree'>
                                <li ><span class='menu_item'><a href='trailers.asp?pl=trailers' class='menu_link' onfocus='blur();' >Trailers</a></span></li>
                                <li ><span class='menu_item'><a href='carts.asp?pl=smartlink' class='menu_link' onfocus='blur();' >AgriFab SmartLINK System</a></span></li>
                                <li ><span class='menu_item'><a href='sweepers.asp?pl=sweepers' class='menu_link' onfocus='blur();' >Sweepers</a></span></li>
                                <li ><span class='menu_item'><a href='spreaders.asp?pl=spreaders' class='menu_link' onfocus='blur();' >Spreaders</a></span></li>
                                <li ><span class='menu_item'><a href='sprayers.asp?pl=sprayers' class='menu_link' onfocus='blur();' >Sprayers</a></span></li>
                                <li ><span class='menu_item'><a href='aerators.asp?pl=aerators' class='menu_link' onfocus='blur();' >Aerators</a></span></li>
                                <li ><span class='menu_item'><a href='dethatchers.asp?pl=dethatchers' class='menu_link' onfocus='blur();' >Dethatchers</a></span></li>
                                <li ><span class='menu_item'><a href='rollers.asp?pl=rollers' class='menu_link' onfocus='blur();' >Rollers</a></span></li>
                                <li ><span class='menu_item'><a href='roughcutters.asp?pl=roughcutters' class='menu_link' onfocus='blur();' >Rough Cutters</a></span></li>
                              </ul>
                            </dd>
                          </dl>
                          <dl>
                            <dt>&nbsp;</dt>
                          </dl>
                        </div>
                        <div class='menu_section'><span class='menu_title'>PROMOTIONS</span>
                          <dl>
                            <dt><span class='menu_item'><a href='../site/internet_specials.htm' class='menu_link' >Internet Specials</a></span></dt>
                          </dl>
                        </div>
                        <div class='menu_section'><span class='menu_title'>CUSTOMER RESOURCES</span>
                          <dl>
                            <dt><span class='menu_item'><a href='../manuals.htm' class='menu_link' >Downloadable Manuals</a></span></dt>
                          </dl>
                        </div>
                        <div class='menu_section'><span class='menu_title'>OUR COMPANY</span>
                          <dl>
                            <dt><span class='menu_item'><a href='../site/aboutus.htm' class='menu_link' >About Country Mower Centre</a></span></dt>
                          </dl>
                          <dl>
                            <dt><span class='menu_item'><a href='../site/faqs.htm' class='menu_link' >FAQ</a></span></dt>
                          </dl>
                          <dl>
                            <dt><span class='menu_item'><a href='../site/contact.htm' class='menu_link' >Contact Us</a></span></dt>
                          </dl>
                          <dl>
                            <dt><span class='menu_item'><a href='../site/findus.htm' class='menu_link' >Find Us</a></span></dt>
                          </dl>
                        </div>
                      </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

            <div class="content_container">
                <div class="content_shadow1">
                    <div class="content_shadow2">
                        <div class="content_shadow3">
                            <div class="content_background">
                                <div class="content_lowerGradiant">
                                    <div class="content">
                                        
    <div class="content_head"><div class="list_title">CARTS</div></div>
    <div class="list_description"><!--[if gte mso 9]><xml>
<o:DocumentProperties>
<o:Template>Normal.dotm</o:Template>
<o:Revision>0</o:Revision>
<o:TotalTime>0</o:TotalTime>
<o:Pages>1</o:Pages>
<o:Words>77</o:Words>
<o:Characters>439</o:Characters>
<o:Company>W.B. Doner</o:Company>
<o:Lines>3</o:Lines>
<o:Paragraphs>1</o:Paragraphs>
<o:CharactersWithSpaces>539</o:CharactersWithSpaces>
<o:Version>12.257</o:Version>
</o:DocumentProperties>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:Zoom>0</w:Zoom>
<w:TrackMoves>false</w:TrackMoves>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:DrawingGridHorizontalSpacing>18 pt</w:DrawingGridHorizontalSpacing>
<w:DrawingGridVerticalSpacing>18 pt</w:DrawingGridVerticalSpacing>
<w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery>
<w:DisplayVerticalDrawingGridEvery>0</w:DisplayVerticalDrawingGridEvery>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:DontGrowAutofit/>
<w:DontAutofitConstrainedTables/>
<w:DontVertAlignInTxbx/>
</w:Compatibility>
</w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="276">
</w:LatentStyles>
</xml><![endif]-->
<!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:0 0 0 0 0 0 0 0 0 0;
mso-font-alt:Helvetica;
mso-font-charset:77;
mso-generic-font-family:roman;
mso-font-format:other;
mso-font-pitch:auto;
mso-font-signature:3 0 0 0 1 0;}
@font-face
{font-family:Frutiger-Light;
panose-1:0 0 0 0 0 0 0 0 0 0;
mso-font-charset:0;
mso-generic-font-family:auto;
mso-font-format:other;
mso-font-pitch:auto;
mso-font-signature:3 0 0 0 1 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-ascii-font-family:Cambria;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Cambria;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
</style>
<![endif]-->
<!--StartFragment-->
<!--[if gte mso 9]><xml>
<o:DocumentProperties>
<o:Template>Normal.dotm</o:Template>
<o:Revision>0</o:Revision>
<o:TotalTime>0</o:TotalTime>
<o:Pages>1</o:Pages>
<o:Words>77</o:Words>
<o:Characters>439</o:Characters>
<o:Company>W.B. Doner</o:Company>
<o:Lines>3</o:Lines>
<o:Paragraphs>1</o:Paragraphs>
<o:CharactersWithSpaces>539</o:CharactersWithSpaces>
<o:Version>12.257</o:Version>
</o:DocumentProperties>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:Zoom>0</w:Zoom>
<w:TrackMoves>false</w:TrackMoves>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:DrawingGridHorizontalSpacing>18 pt</w:DrawingGridHorizontalSpacing>
<w:DrawingGridVerticalSpacing>18 pt</w:DrawingGridVerticalSpacing>
<w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery>
<w:DisplayVerticalDrawingGridEvery>0</w:DisplayVerticalDrawingGridEvery>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:DontGrowAutofit/>
<w:DontAutofitConstrainedTables/>
<w:DontVertAlignInTxbx/>
</w:Compatibility>
</w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="276">
</w:LatentStyles>
</xml><![endif]-->
<!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:0 0 0 0 0 0 0 0 0 0;
mso-font-alt:Helvetica;
mso-font-charset:77;
mso-generic-font-family:roman;
mso-font-format:other;
mso-font-pitch:auto;
mso-font-signature:3 0 0 0 1 0;}
@font-face
{font-family:Frutiger-Light;
panose-1:0 0 0 0 0 0 0 0 0 0;
mso-font-charset:0;
mso-generic-font-family:auto;
mso-font-format:other;
mso-font-pitch:auto;
mso-font-signature:3 0 0 0 1 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-ascii-font-family:Cambria;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Cambria;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
</style>
<![endif]-->
<!--StartFragment--><span style=" font-family:Verdana, Geneva, sans-serif; font-size:12px; text-align:left">
<% = model %>
</span><!--EndFragment-->
<!--EndFragment-->
</div>
<td width="<%=coll_width%>%" align="center" valign="top" bgcolor="#FFFFFF"><table width="100%" height="100%" border="0" align="center" cellpadding="5" cellspacing="0" style="border:1px solid #999">
  <tr bgcolor="#FFFFFF"   >
    <td colspan="2" rowspan="2" valign="top" bordercolor="#FFFFFF"><a href="images/<% = pic_main %>"><img src="images/<% = pic_main %>" alt="" width="200" border="0" /></a></td>
    <td colspan="5"  valign="middle" bordercolor="#FFFFFF"><span style=" font-family:Verdana, Geneva, sans-serif; font-size:12px; text-align:left">
      <% = product_desc %>
    </span></td>
  </tr>
  <tr bgcolor="#FFFFFF"   >
    <td height="204" colspan="5" bordercolor="#FFFFFF"><p><span style=" font-family:Verdana, Geneva, sans-serif; font-size:12px; text-align:left">
      <% = product_other_desc %>
    </span></p>
      <p><span style=" font-family:Verdana, Geneva, sans-serif; font-size:12px; text-align:left">
        <% = product_desc1 %>
        <br />
        </span><span style=" font-family:Verdana, Geneva, sans-serif; font-size:12px; text-align:left">
          <% = product_desc2 %>
          <br />
          </span><span style=" font-family:Verdana, Geneva, sans-serif; font-size:12px; text-align:left">
            <% = product_desc3 %>
            <br />
            </span><span style=" font-family:Verdana, Geneva, sans-serif; font-size:12px; text-align:left">
              <% = product_desc4 %>
              <br />
              </span><span style=" font-family:Verdana, Geneva, sans-serif; font-size:12px; text-align:left">
                <% = product_desc5 %>
                <br />
                </span><span style=" font-family:Verdana, Geneva, sans-serif; font-size:12px; text-align:left">
                  <% = product_desc6 %>
                  <br />
                  </span><span style=" font-family:Verdana, Geneva, sans-serif; font-size:12px; text-align:left">
                    <% = product_desc7 %>
                    <br />
                    </span><span style=" font-family:Verdana, Geneva, sans-serif; font-size:12px; text-align:left">
                      <% = product_desc8 %>
                    </span></p></td>
  </tr>
  <tr bgcolor="#FFFFFF"   >
    <td width="98" height="40" align="center" valign="top" bordercolor="#FFFFFF"><strong> Lawn<br />
      Size</strong></td>
    <td width="98" align="center" valign="top" bordercolor="#FFFFFF"><strong>Cutting<br />
      Width</strong></td>
    <td width="92" align="center" valign="top" bordercolor="#FFFFFF"><strong>Cutting<br />
      Height</strong></td>
    <td width="95" align="center" valign="top" bordercolor="#FFFFFF"><strong>Grassbag<br />
      Capacity</strong></td>
    <td width="98" align="center" valign="top" bordercolor="#FFFFFF"><strong>Power<br />
      Unit</strong></td>
    <td width="222" colspan="2" align="center" valign="middle" bordercolor="#FFFFFF"><strong><span style=" font-family:Verdana, Geneva, sans-serif; font-size:12px; text-align:left">
      <% = price %>
      </span></strong><br />      <br />    </td>
  </tr>
  <tr bgcolor="#FFFFFF"   >
    <td height="40" align="center" valign="middle" bordercolor="#FFFFFF"><span style=" font-family:Verdana, Geneva, sans-serif; font-size:12px; text-align:left">
      <% = lawnsize %>
    </span></td>
    <td height="40" align="center" valign="middle" bordercolor="#FFFFFF"><span style=" font-family:Verdana, Geneva, sans-serif; font-size:12px; text-align:left">
      <% = cuttingwidth %>
    </span></td>
    <td width="92" align="center" valign="middle" bordercolor="#FFFFFF"><span style=" font-family:Verdana, Geneva, sans-serif; font-size:12px; text-align:left">
      <% = cuttingheight %>
    </span></td>
    <td height="40" align="center" valign="middle" bordercolor="#FFFFFF"><span style=" font-family:Verdana, Geneva, sans-serif; font-size:12px; text-align:left">
      <% = grassbagcapacity %>
    </span></td>
    <td height="40" align="center" valign="middle" bordercolor="#FFFFFF"><span style=" font-family:Verdana, Geneva, sans-serif; font-size:12px; text-align:left">
      <% = powerunit %>
    </span></td>
    <td width="222" colspan="2" align="center" valign="middle" bordercolor="#FFFFFF"><form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
      <input type="hidden" name="cmd" value="_cart" />
      <input type="hidden" name="business" value="lawntractor@fsmail.net" />
      <input type="hidden" name="lc" value="GB" />
      <input type="hidden" name="item_name" value="<% = model %>" />
      <input type="hidden" name="amount" value="<% = price %>" />
      <input type="hidden" name="shipping" value="<% = carriage %>" />
      <input type="hidden" name="currency_code" value="GBP" />
      <input type="hidden" name="button_subtype" value="products" />
      <input type="hidden" name="no_note" value="0" />
      <input type="hidden" name="add" value="1" />
      <input type="hidden" name="bn" value="PP-ShopCartBF:btn_cart_SM.gif:NonHostedGuest" />
      <input type="image" src="../images/addtocartbutton.png" border="0" name="submit" alt="PayPal - The safer, easier way to pay online." />
      <img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1" />
    </form></td>
  </tr>
</table></td>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="footer">
                
<div class="copyright">&copy;2012 Country Mower Centre - Some portions &copy; Agri-Fab, Inc. All rights reserved.</div><div class="footer_links"><span class='footer_item'><a href='../site/privacy_policy.htm' class='footer_link' >Privacy Policy</a></span>
| <span class='footer_item'><a href='../site/terms_of_use.htm' class='footer_link' >Terms of Use</a></span>
| <span class='footer_item'><a href='../sitemap.htm' class='footer_link' >Site Map</a></span>
</div>
            </div>
        </div>
    </div>
    </form>
</body>
<!-- Added by HTTrack -->

<meta http-equiv="content-type" content="text/html;charset=utf-8" /><!-- /Added by HTTrack -->
</html>
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Brian Chandler
post Apr 18 2012, 11:19 AM
Post #2


Jocular coder
********

Group: Members
Posts: 2,234
Joined: 31-August 06
Member No.: 43



Do you think it is reasonable to expect someone to plough through 540 lines to find the relevant bit?

You need to use some sort of number formatting; I don't know anything about ASP, but try looking for printf() or similar functions.


--------------------
Brian Chandler
Nothing in this post constitutes "commercial solicitation". PayPal does not solicit residents of Japan. Contents may settle in transit. "Legal mind" may or may not be brain-damaged.
User is online!PM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
G98
post Apr 30 2012, 05:24 AM
Post #3





Group: Members
Posts: 1
Joined: 30-April 12
Member No.: 17,010



You need to set your output price using the vb function formatNumber(<number>,<decimalplaces>). For example:

<%
dim thisNumber

thisNumber = 5.20
response.write thisNumber & " = " & FormatNumber(thisNumber,2) & "<br>"

thisNumber = 5.19
response.write thisNumber & " = " & FormatNumber(thisNumber,2) & "<br>"

%>

or in your case:

price=FormatNumber(rs("Total Retail") ,2)
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 21st October 2014 - 01:22 PM