Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sql server smallmoney conversion to c# type

Status
Not open for further replies.

Casbah

Programmer
May 18, 2004
31
IE
i have a sql server DB that uses the type "smallmoney"
how can i convert this to a c# type, i have tried
SqlMoney balanceDue = (SqlMoney)accountSet1.Tables["Account"].Rows[0]["Balance_Due"];
and
double balanceDue = (double)accountSet1.Tables["Account"].Rows[0]["Balance_Due"];
but both of these give me invalid cast type errors, anyone know whats going on?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top