Thanks Geoff, I clearly understood now ; )

Adriano Crestani

On 1/30/07, Geoffrey Winn <[EMAIL PROTECTED]> wrote:

Adriano,

getUserData is not an alternative to getInteger (and similar).

As best I can tell, it was added to allow people to add some user specific
data to a data object. The data is supplied (in setUserData) as a void* so
it really can be anything. This option exists for all data objects,
regardless of their type. I believe the PHP SDO extension uses  this
mechanism so that every data object holds an identifier that points back
to
some corresponding PHP entity.

Does that help?

Regards,

Geoff.

On 30/01/07, Adriano Crestani <[EMAIL PROTECTED]> wrote:
>
> Hi, I'm trying to find out how the method void*
> DataObject::getUserData(const SDOString& path) works. I thought it was
the
> same as, for example, long DataObject::getInteger(const SDOString&
path):
>
> DataObject do;
> do.setInteger("id", 123);
> long id1 = do.getInteger("id");
> long* id2 = (long*) do.getUserData("id");
>
> I thought the id1 would be the equals id2. Am I misunderstanding the
> getUserData functionality?
>
> Adriano Crestani
>
>


Reply via email to