Microsoft
Software
Hardware
Network
Question : format of numeric data in nvarchar field
Hi, I'm looking to populate a nvarchar(10) field with a numeric currency data, however when transposing across the fields get truncated removing the trailing zeros.
The two lines below are where I get the value from one table and then populate it to a parameter to be added to a separate table.
decimal
myprice
= Convert.ToDecimal(row["GFP
roductPric
e"]);
SQLCmd3.Parameters.AddWith
Value("@AW
PText", (String.Format("£{0:#.##}"
,
myprice
)));
If I get a numeric value such as 9.99 (from
row["GFProductPrice"])
it is fine and moves £9.99 to
@AWPText
, however if I have 9.90 it just moves £9.9 to
@AWPText
, likewise I would also want to manage if I receive a numeric of 9.9 from
row["GFProductPrice"]
and ensure that this get moved to £9.90 in
@AWPText
.
How can I ensure that @AWPText always has the value to 2 decimal places recorded i.e £999.
99
Any suggestions
Answer : format of numeric data in nvarchar field
The lastest version of Safari for Tiger (10.4) is Safari 4.1.
You can download it from this link:
http://support.apple.com/k
b/DL1045
Random Solutions
Cisco ASA 5505 with AIP-SSC-5 card
HP Dataprotector error "Automatic DR information could not be collected"
Sonicwall rule to block DHCP traffic between two site-to-site
Strange SQL Error
Dreamweaver deployment view questions.
Error ORA-1722 when DAO is writing data to an Oracle 11g database
KDC errors in middle of the night - had to reboot to get server back up
Win RAR
i have xenapp do i need xendesktop
Datalist reset all its items when OnItemCommand is fired