Success using I_ValueDateTime_Ptr; but how to use I_ValueDate_Ptr and I_ValueTime_Ptr?

Matthew Jew mjew at icnc.com
Thu Jun 29 22:24:29 CDT 2006


Hello,

I have been able to set DateTime fields like this:

I_ValueDateTime_Ptr pvdt = fbl_dynamic_cast<I_ValueDateTime> 
( aAuthFailureLogTable.loginDateTime->get_Value(forAdd) );
pvdt->put_DateTime( aDateTimeRec->year, aDateTimeRec->month,  
aDateTimeRec->day, aDateTimeRec->hour, aDateTimeRec->minute,  
aDateTimeRec->second, 0 );

but when I try to do the equivalent thing for Date fields and Time  
fields, it doesn't even compile:

I_ValueDate_Ptr pvd = fbl_dynamic_cast<I_ValueDate>( anArticleTable- 
 >date->get_Value(forAdd) );
pvd->put_Date( aDateTimeRec.year, aDateTimeRec.month,  
aDateTimeRec.day );
I_ValueTime_Ptr pvt = fbl_dynamic_cast<I_ValueTime>( anArticleTable- 
 >time->get_Value(forAdd) );
pvt->put_Time( aDateTimeRec.hour, aDateTimeRec.minute,  
aDateTimeRec.second, 0 );


/Volumes/Alpha2/Dev-NuPV/PVReplicator2/../Common-Classes/Valentina2pv/ 
ArticleDBManager2.mm:230: error: 'I_ValueDate_Ptr' was not declared  
in this scope
/Volumes/Alpha2/Dev-NuPV/PVReplicator2/../Common-Classes/Valentina2pv/ 
ArticleDBManager2.mm:230: error: expected `;' before 'pvd'
/Volumes/Alpha2/Dev-NuPV/PVReplicator2/../Common-Classes/Valentina2pv/ 
ArticleDBManager2.mm:231: error: 'pvd' was not declared in this scope
/Volumes/Alpha2/Dev-NuPV/PVReplicator2/../Common-Classes/Valentina2pv/ 
ArticleDBManager2.mm:232: error: 'class fbl::I_Field_Ptr' has no  
member named 'Set'
/Volumes/Alpha2/Dev-NuPV/PVReplicator2/../Common-Classes/Valentina2pv/ 
ArticleDBManager2.mm:233: error: 'I_ValueTime_Ptr' was not declared  
in this scope
/Volumes/Alpha2/Dev-NuPV/PVReplicator2/../Common-Classes/Valentina2pv/ 
ArticleDBManager2.mm:233: error: expected `;' before 'pvt'
/Volumes/Alpha2/Dev-NuPV/PVReplicator2/../Common-Classes/Valentina2pv/ 
ArticleDBManager2.mm:234: error: 'pvt' was not declared in this scope

What is the syntax for doing this with Date fields and Time fields?

- Matthew



More information about the Valentina mailing list