Trailing Zeros are being stripped

Trailing Zeros are being stripped

Post by Larry Pag » Fri, 01 Feb 2002 20:34:20



Greetings,

I'm querying an Informix backend from VB and discovered the trailing zeros
in my numerical fields are being stripped from my data. i.e. 800 bcomes 8,
2400 becomes 24, 5000 is 5.  I initially suspected this to be something with
the ODBC drivers but I've began to wonder if there is a setting in the VB
environment that I am unaware of that could be causing this.  Any ideas are
appreciated. I have a deadline to meed next week!

I have cross posted this to the vb.odbc forum but thought it might also be
due to my general lack of knowledge about Informix and I should post here as
well.

L

 
 
 

1. 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


2. Re : Help....

3. I am getting this message when i am tring to export or import anything using

4. Howto: using linked server

5. error ORA-01855: AM/A.M. or PM/P.M. required

6. HK: Access/Sybase Developer Required

7. Busy Day = Slowdown from 12 AM - 5 AM

8. electronic version of figures in Elmasri & Navathe

9. Use of @am, Am I dumb?

10. Strip trailing commas

11. T-Sql and stripping leading zeros

12. Jet Engine stripping off leading zero

13. Stripping out lead zeros ?