Dropping Decimals

I created a "calculator" but it spits the results with too many decimals.Is there any way to write only the first two decimals as suppoused of all the ones the operation creates?

View Replies


ADVERTISEMENT

Dropping A Comma

I am trying to post some data from the database to an XML file. Everything works except for a stray comma that comes from the database and exists at the end of the address string. For example, "123 Anywhere Street,"

I would like to kill that comma that will always exist at the end of the address string.

My initial thoughts:

oldaddr = request.form(business_address)
vbl = len(address) - 1
newaddr = left(oldaddr, vbl)

I tell it to do response.write on all variables involved, but for some reason the calculation is not being performed. No errors. What am I missing?

View Replies View Related

Insert Statement Dropping Values

i'm reading in a .csv file and then inserting the data into a mssql db. batchid sometimes shows up blank. the values that are disappearing begin with the letter "N", such as "NP2338" or "N00312". outside of those that begin with "N", the rest are a five digit number. the table field is varchar. why is it dropping those that begin with "N"?

View Replies View Related

Trouble Dragging And Dropping User Controls (ASP.NET)

I have created a user control (ascx) in C# which accesses a database and
fills a datagrid. When i attempt to drag and drop this control onto a new Web
Form (aspx), my VS .NET 2003 program crashes. I am forced to programmatically
reference the user control.

Can anyone guess if this is a problem w/ my software (VS.NET 2003) or is it
not posssible to drag and drop "complex" user controls?

View Replies View Related

Decimals From MySQL

I'm as the topic notes, having some problems with recieveing decimal values from my database(MySQL). I'm pretty sure its a simple misstake, but since im pretty new to asp-syntaxes, I dont get it.

What I have is a table with a float(30,30) (yes, 30 decimals, its an experiment so I wanto "be safe"). I can take a variable, fill it with a jibberish numeric value say 1.111111111111 and write it in, works like a charm if I check the database manualy, however, I cant get it out!

Whenever I read from that database and into a value, I only get the first 5 decimals and the rest is left out, even if I display the database-value directly I cant get it to work!

If I do response.write MyResult("value") it still displays 1.11111 even if the actual value in the database is 1.1111111111->etc.

What could be wrong here?

If I do a little .....

View Replies View Related

Rounding Decimals 2 Places

Right now I round my number to 2 decimal places... and since I am dealing with money values I need to show $100.70...but my calculations show $100.7. Is there a way to fix this? How can I tack on a "0" if it only shows 1 decimal place?

View Replies View Related

Show Fixed Decimals

How do I show a double with 2 decimal places in vbscript? Also is there a way to show a string that is holding a number with two decimal places or does it need to be converted to doulbe first and then converted back to string after manipulating the double?

View Replies View Related

How Do I Remove Decimals From A Shopping Cart Prices

I have almost completed a small japanese shopping cart in asp. The shopping cart was freecode in english and I converted it to japanese. The problem is japanese Yen does not use decimals and the prices are displaying decimals.

The cart uses a access db, I went into the db and specified the price to have no decimals but the decimals are still being displayed . Is there a easy way to get rid of the decimals Code:

View Replies View Related

How To Force Decimals To Display In Exponential Notation

I am programming a page that displays scientific data retrieved from a
data source to an asp-web page and i would like to force all number to
be formatted/displayed in scientific notation no matter what the value
is. (i.e. x = 123 would be displayed as x = 1.23e+02). The standard
function "formatnumeric(x[,n])" does not seem to be able to do this for
me or at least I don't know how to use it that way.

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved