Select to view content in your preferred language

Create RelationShip Class using File Geodatabase API

3442
4
09-17-2012 06:22 AM
ParvathavardhaniGanesan
Emerging Contributor
Is it possible to create relationship of the table using File geodatabase API? If yes, how?
0 Kudos
4 Replies
LanceShipman
Esri Regular Contributor
Relationship classes are not supported by the File Geodatabase API. They cannot be created or utilized in any way.
0 Kudos
ParvathavardhaniGanesan
Emerging Contributor
Thanks for the quick response
0 Kudos
AmitSaini
Emerging Contributor
Can we run the bulk update or insert queries on File geodatabase using File GDB API ?

For example :

UPDATE Table1 SET Field1=a.Field2 FROM Table2 a , Table1 b where a.OID=b.OID.

Both Table1 and Table2 are names of two featureclasses present in my File geodatabase.

While running I am getting exception saying "An Invalid SQL statement was used."

Could someone please comment that am I doing something wrong or This is not possible with File GDB API yet.
0 Kudos
LanceShipman
Esri Regular Contributor
File Geodatabase SQL is based mostly on the SQL92 standard which does not include FROM in an a UPDATE. Normally this sort of update would be performed using a subquery.

The 1.0-1.3 versions of the API are based on File Geodatabase as it existed at 10.0. This did not include support for aliasing. So "SET Field1=a.Field2 FROM Table2 a , Table1 b where a.OID=b.OID" would return an error in any case. The next release which is expected later in 2013 will be updated to 10.2 File Geodatabase SQL.

File Geodatabase support for subqueries is limited, so I can not promise that it would work in this case. I'll take a look and report my findings.
0 Kudos