I want to fetch the table without using primary key
Asked
Active
Viewed 623 times
1

EKNATH KULKARNI
- 394
- 1
- 5
- 13
-
Hi, another time instead of a screenshot of text, please add the text itself, otherwise it isn't indexable, just for the record. In order to update a datable entry in ThingWorx, you need the primary key for sure, to do what you want to do, first query the datatable with QueryDataTableEntries where you can do a complex query as you want and then you will have the PrimaryKey in order to update the returned entries. – Carles Coll May 03 '19 at 06:56
-
@CarlesColl, Thank you for your comment. As we use the QueryDataTableEntries, It has scan the whole table and then we will get the primary key for update. For updation also it has to scan the table. The whole operation consumes time and computation power, and one more problem I am facing is if I fired update data table entry then it is updating only when I specify all column values. I want to carry out the operation as a minimum as the cost of time. – EKNATH KULKARNI May 06 '19 at 05:35
-
Hi, Updating DataTable entry on ThingWorx will always act as a whole (all columns, as columns in ThingWorx DataTables are stored as a JSON only one column). You can add Indexes on the DataTable in order to query more effectively, but then you must use "values" parameter instead of "query" parameter --> Limitation, You can only do queries like fieldA && fieldB && fieldC.... If you really need to work intensively with Database Tables, better you go use Thingworx JDBC connectivity features in order to connect directly to "real" database Table with all the features that a RDBMS has. – Carles Coll May 08 '19 at 08:22