HELP: Conversion from CComVariant to DBTIMESTAMP 
Author Message
 HELP: Conversion from CComVariant to DBTIMESTAMP

How do I assign a VARIANT value I get from an XML document into a
DBTIMESTAMP member of my CCommand Accessor class (OLE DB Consumer Template)
to execute a stored procedure and insert this value as a datetime field?  Do
I need to use IDataConvert interface?  Where do I retrieve this interface
from?  Is there an easier way around this problem?

Thanks.

-Jon Cortez



Fri, 07 Mar 2003 03:00:00 GMT  
 HELP: Conversion from CComVariant to DBTIMESTAMP


Fri, 19 Jun 1992 00:00:00 GMT  
 HELP: Conversion from CComVariant to DBTIMESTAMP

1) Change the variable type in your accessor to DATE and the corresponding
column entry to COLUMN_ENTRY_TYPE(x, DBTYPE_DATE, m_YourVariable).

2) Assign the VARIANT's content to your variable, previously converting it
to VT_DATE if needed.

3) OLE DB will take care of the type conversion from your accessor to the
data store.

Gabriel Kniznik



Quote:
> How do I assign a VARIANT value I get from an XML document into a
> DBTIMESTAMP member of my CCommand Accessor class (OLE DB Consumer
Template)
> to execute a stored procedure and insert this value as a datetime field?
Do
> I need to use IDataConvert interface?  Where do I retrieve this interface
> from?  Is there an easier way around this problem?

> Thanks.

> -Jon Cortez



Sat, 08 Mar 2003 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. HELP: Conversion from CComVariant to DBTIMESTAMP

2. Conversion between DBTIMESTAMP and DATE types

3. conversion between DBTIMESTAMP and DATE types

4. Conversion between DBTIMESTAMP and DATE types

5. Help: Converting Date to DBTimeStamp

6. Help: Converting Date to DBTimeStamp

7. How to convert between DBTIMESTAMP and DATE types

8. COleDateTime vers DBTIMESTAMP

9. DBTIMESTAMP (and CTime)

10. How to convert between DBTIMESTAMP and DATE types

11. Bug in CComVariant::GetSize

12. CComVariant Q

 

 
Powered by phpBB® Forum Software