Hello, I'm having some difficulty creating a QueryTable using the OpenQueryTable method associated with the Geodatabase class. Does this method work with mobile geodatabases? The API documentation shows examples using an enterprise geodatabase.
In the code below, the QueryDef that I use to create the QueryTableDescription object has already been tested successfully (with a row cursor):
QueryDef queryDef = new QueryDef()
{
SubFields = selectFields,
Tables = selectTables,
WhereClause = whereClause
};
// Prepare a QueryTableDescription object used to create a Query Table.
QueryTableDescription queryTableDescription = new QueryTableDescription(queryDef)
{
Name = "TestTable"
PrimaryKeys = geodatabase.GetSQLSyntax().QualifyColumnName("SEGMENTS", "OBJECT_ID")
};
// Create the Query Table
Table queryTable = geodatabase.OpenQueryTable(queryTableDescription);
The .OpenQueryTable() method keeps throwing the following error:
