|
-
December 1st, 2003, 12:29 AM
#14
Originally posted by sslavko
Code:
COleVariant v;
recordset.GetFieldValue(10, v);
COleCurrency c(v);
CString strReturnVal = c.Format();
This is correct way to read currency from database and to convert it to string. If you need other locale then user default, take a look on parameters for COleCurrency::Format();
Unfortunaly the CRecordSet::GetFieldValue() does not take a COleVariant object as a param. If I am not wrong this will only work if you use the class CDaoRecordset.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|