Sunday, March 11, 2012

Yes I have no Money

Use String.Format() to format the output. If you are in a DataGrid, you can
use Format() as well to make sure it displays correctly.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************
"Bob" wrote:
> Hello:
> VB.NET 2003
> Windows App
> SQL 2k Backend
> Typed DataSet
> I have a bound TextBox to a Money column in SQL Server 2k. When the dataset
> loads, it shows 4 decimals. The data type in the schema designer is Decimal.
> I realy don't care which type I use but I realy do need it to show 2 decimal
> places even if the value is 5.20. I created a user but the data coming from
> the DB is still giving me 4 decimals. I tried changing the data type but
> that gives me 5.2 for 5.20.
> Can someone point me to a good article. I've already seen soem on code
> project and a few other places but none of them are designed to work with
> databound. I can't believe .NET doesn't have that setting in the properties
> window anymore. more and more I use this, it seems always something lost
> from VB6
> TIA
> Bob
>
>
Cowboy:
It's progress.
I tired this
FormatCurrency(TextBox1.Text, 2, TriState.False, TriState.True,
TriState.True)
The error is Cast from string to type double is not valid
TIA
Bob

No comments:

Post a Comment