[Valentina][VSDK] M:M problems
Ruslan Zasukhin
sunshine at public.kherson.ua
Mon Jan 20 23:43:28 CST 2003
on 1/20/03 11:08 PM, Eric Forget at forgete at cafederic.com wrote:
> For the my class:
>
> class CGroupPerson : public VDK_BaseObject
> {
> public:
> VDK_ObjectPtr mGroupPtr;
> VDK_ObjectPtr mPersonPtr;
> VDK_ULLONG mGP;
>
> public:
> CGroupPerson ()
> : VDK_BaseObject( "GroupPerson" ),
> mGroupPtr( "GroupPtr", NULL, kFBL_CASCADE ),
> mPersonPtr( "PersonPtr", NULL, kFBL_CASCADE )
> mGP( "GP", fUnique )
> {
> // next call make field to be calculated
> mGP.SetMethod( "some formula here" );
> }
> };
>
> I've tried all of these:
>
> mGP.SetMethod( "BitAnd( shiftleft(mGroupPtr,32), mPersonPtr" );
> mGP.SetMethod( "BitAnd( shiftleft(mGroupPtr,32), mPersonPtr)" );
> mGP.SetMethod( "BitAnd( shiftleft(GroupPtr,32), PersonPtr)" );
>
> Unfortunately, I cannot add more than 1 record (whatever the combinaison of
> person and group). It always return error 344 (kFBL_FieldIsUnique). Any
> idea?
But that was juts example of idea!
I have ask look into SQL.pdf for correct names of functions,
I just do not remember.
Okay, I have look inside, and I see that we have made in Valentina
<< and >> operators
So at least must be
mGP.SetMethod( "BitAnd(mGroupPtr << 32), mPersonPtr" );
And now we need find how correctly do bit AND ...
Ops. I do not see function for this...
Okay I need add them.
But it seems you can simply use +
mGP.SetMethod( "(mGroupPtr << 32) + mPersonPtr" );
--
Best regards,
Ruslan Zasukhin [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list go to:
http://listserv.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
More information about the Valentina
mailing list