Generating UniqueID (FdoDatatype_UniqueID )

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Generating UniqueID (FdoDatatype_UniqueID )

prem
hi,
I am creating a database and wanted to generate unique ID (in postgres there exists an Autoincremented type Integer).
Do we have any such datatype in FDO?

What is FdoDatatype_UniqueID? can it be used with postgres?

Regards,
Prem
Reply | Threaded
Open this post in threaded view
|

Re: Generating UniqueID (FdoDatatype_UniqueID )

Jackie Ng
FdoDataType_UniqueID appears to be a GUID logical data type in FDO that whose implementation appears to be either in draft or in limbo (possibly explaining why all such references to this enum value are commented out and there's no mention of this data type in the public API)

A shame, because I'd like FDO to support GUIDs at the API level.

- Jackie
Reply | Threaded
Open this post in threaded view
|

Re: Generating UniqueID (FdoDatatype_UniqueID )

Jackie Ng
In reply to this post by prem
But to answer your question specifically. If you're inserting a feature into a feature class that has an auto-generated property a value should be generated for you, so when preparing a FDO insert command, you simply omit setting a value for the auto-generated property.

You can inspect this new value as part of the feature reader that's returned by FdoIInsert::Execute()

- Jackie
Reply | Threaded
Open this post in threaded view
|

Re: Generating UniqueID (FdoDatatype_UniqueID )

prem
Thank you Jackie Ng....i was able to solve issue and values were automatically generated.