How to use put_DateTime

Matthew Jew mjew at icnc.com
Wed May 24 18:44:56 CDT 2006


> On 5/24/06 5:42 AM, "Matthew Jew" <mjew at icnc .D.OT com> wrote:
>
> Hi Mathew,
>
> http://www.valentina-db.com/dokuwiki/doku.php? 
> id=paradigma:public:en:documen
> tation:vsdk:manual:architecture:architecture
>
> Here go to Valentina C++ SDK Interfaces
>
> Here at end of page: Switching between Interfaces
>
>
> > I cannot figure out what to call instead of "get_Value" so that I  
> can
> > use "put_DateTime" on my "loginDateTime" field.
> >
> > I_Field_Ptr loginDateTime;
> >
> > aAuthLogTable.loginDateTime->get_Value(forAdd)->put_DateTime
> > ( aDateTimeRec->year, aDateTimeRec->month, aDateTimeRec->day,
> > aDateTimeRec->hour, aDateTimeRec->minute, aDateTimeRec->second, 0 );
> >
> > Should this field be declared as an "I_Field_Ptr" or as something  
> else?
> > How do I make the call to "put_DateTime" work?
>
> loginDateTime ->get_Value()
>
> Returns you I_Value
>
> You want put_DateTime() function, which is in I_ValueDateTime  
> interface
> located at FBL_I_ValueDateTime.h
>
> So you need do switch between interfaces:
>
> I_Value_Ptr pv = aAuthLogTable.loginDateTime->get_Value(forAdd);
>
> I_ValueDateTime_Ptr pvdt = fbl_dynamic_cast<I_ValueDateTime >(pv);
>
> pvdt->put_DateTime( ....... );
>
>
> -- 
> Best regards,
>
> Ruslan Zasukhin
>

Ruslan,

That works very well when adding records; however, it does not work  
for simply reading values.

When I use:

Const_I_Value_Ptr pv = aAuthLogTable.loginDateTime->get_Value();

I_ValueDateTime_Ptr pvdt = fbl_dynamic_cast<I_ValueDateTime >(pv);

pvdt->get_DateTime( .... );

I get a compilation error.

I have tried various combinations and changes, but I still cannot  
make it work.

What is the syntax for reading?

- Matthew



More information about the Valentina mailing list