Hi
I wanto to know if there is a way to convert a DBNull.Value to Decimal and
returns to me Decimal.Zero?
Examples
COLUMN1 = NULL from DB
Ex1.: cstr((dt.rows(0 ).item("COLUMN1 "))
returns Error
Ex2.: dt.rows(0).item ("COLUMN1").toS tring
returns String.Empty
Ex3.: cdec((dt.rows(0 ).item("COLUMN1 "))
returns Error
Is there a way to return to me Decimal.Zero??
I use this...
cdec((iif(dt.ro ws(0).item("COL UMN1") is dbnull.value,
decimal.zero,dt .rows(0).item(" COLUMN1") ) )
I wanto to know if there is a way to convert a DBNull.Value to Decimal and
returns to me Decimal.Zero?
Examples
COLUMN1 = NULL from DB
Ex1.: cstr((dt.rows(0 ).item("COLUMN1 "))
returns Error
Ex2.: dt.rows(0).item ("COLUMN1").toS tring
returns String.Empty
Ex3.: cdec((dt.rows(0 ).item("COLUMN1 "))
returns Error
Is there a way to return to me Decimal.Zero??
I use this...
cdec((iif(dt.ro ws(0).item("COL UMN1") is dbnull.value,
decimal.zero,dt .rows(0).item(" COLUMN1") ) )
Comment