COleVariant class object strips off any leading/trailing zeros 
Author Message
 COleVariant class object strips off any leading/trailing zeros

I am using COleVariant data type to write a text field data type
to ACCESS database with data like "02323223230".  The funny
thing is when I am using the following:
m_ssn = "0923230"
----------------------------------------------------------------------------
------------
rs.SetFieldValue(_T("ssn"), COleVariant(m_ssn, VT_BSTRT));
----------------------------------------------------------------------------
------------
** When I save to Access, the ssn field will be = "92323"
** all the leading and trailing zeros will be stripped. IS IT A BUG
WITH COleVariant data type for TEXT field data types of mapped
data.
----------------------------------------------------------------------------
------------
// where rs =  CDaoRecordset
//             ssn = field name in MS ACCESS
// m_ssn = is the CString mapped to the edit control

Reddy M Rameswar




Sat, 10 Jun 2000 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. COleVariant class object strips off any leading/trailing zeros

2. COleVariant class object strips off any leading/trailing zeros

3. truncating leading/trailing zeros with CString::Format();

4. Help with RegEx - checking for leading chars with trailing numbers

5. Leading and Trailing Blanks

6. Newbie: remove leading/trailing space

7. removing trailing and leading spaces

8. Leading and Trailing Blanks

9. Removing leading/trailing spaces

10. printf: want trailing zeros gone

11. CString::Format doesnt remove trailing Zeros using %lf

12. ATL: Time's Leading-Zero formatting character removed

 

 
Powered by phpBB® Forum Software