Ask a Question related to ASP Database, Design and Development.
-
Chris Kennedy #1
Sql Server and VBScript decimal problem
I am pulling a decimal value from SQL server and trying to use the format
currency and format number function. I am using these values in a large
string of HTML to be used in a CDONTS Email. If I use the code fragment
below the price variable, which is 3.92 in the database, shows up as £392.
When the formatcurrency is removed it is displayed as 3.92 but!!!! if I
concatenate a "£" it displays £392. I have read some posts about VBscript
not liking decimals, are there any ways around this. I have tried a
conversion to the money datatype, used a variety of csng and cdbl functions.
The odd thing is other numbers from the same column in the recordset format
correctly. The other thing is that variable 'price' is used elsewhere and
calculates correctly it seems VBscript just doesn't like converting it to a
string. Totally stumped!! Can anyone help.
HTML = HTML & "<td>" & formatcurrency(price) & "(€" &
formatnumber(price*rate,2) & ")" & "</td>"
Chris Kennedy Guest
-
I?ve got a problem writing files on the server side withFlash Media Server 2.0.2 and 2.0.3.
Hello, I?ve got a problem writing files on the server side with Flash Media Server 2.0.2 and 2.0.3. The same code was working fine with an older... -
InDesign "Decimal" problem Solved (e.g. 0.500500500500)
Dear All, Please update your OS from 10.4.X to OS 10.4.8 directly from the net through software update from the Apple Menu. This will resolve the... -
RSS Feed Eater - VBScript Server Behaviour released
Hi, I have just added my latest Dreamweaver extension to my website. It makes the task of consuming and displaying RSS feeds on ASP VBScript web... -
UltraSuite 7.5.5 for ASP/VBScript server model released!
Friends, I would like to inform you that I have just released version 7.5.5 of UltraSuite for ASP/VBScript. The screenshots for this version... -
Testing Server problem: Server name or address couldnot be resolved!
Not sure if this helps but I was going step by step in the Getting Started Experience Tutorial and when it got to the Database tab -- RDS Login... -
Aaron [SQL Server MVP] #2
Re: Sql Server and VBScript decimal problem
[url]http://www.aspfaq.com/5003[/url]
--
[url]http://www.aspfaq.com/[/url]
(Reverse address to reply.)
"Chris Kennedy" <chrisknospam@cybase.co.uk> wrote in message
news:eKOpTOieEHA.2396@TK2MSFTNGP11.phx.gbl...functions.> I am pulling a decimal value from SQL server and trying to use the format
> currency and format number function. I am using these values in a large
> string of HTML to be used in a CDONTS Email. If I use the code fragment
> below the price variable, which is 3.92 in the database, shows up as £392.
> When the formatcurrency is removed it is displayed as 3.92 but!!!! if I
> concatenate a "£" it displays £392. I have read some posts about VBscript
> not liking decimals, are there any ways around this. I have tried a
> conversion to the money datatype, used a variety of csng and cdblformat> The odd thing is other numbers from the same column in the recordseta> correctly. The other thing is that variable 'price' is used elsewhere and
> calculates correctly it seems VBscript just doesn't like converting it to> string. Totally stumped!! Can anyone help.
>
> HTML = HTML & "<td>" & formatcurrency(price) & "(€" &
> formatnumber(price*rate,2) & ")" & "</td>"
>
>
Aaron [SQL Server MVP] Guest



Reply With Quote

