How to check whether Database Transaction completed or not?

Dear Inductive Team,

We need to load multiple datasets in a single Event, one dataset based on another datset result. Example:

vDS1 = system.db.runQuery("SELECT * FROM Table1;") vValue1 = vDS1.getValueAt(2, 0) vDS2 = system.db.runQuery("SELECT * FROM Table2 WHERE Col1 = %s;"%(vValue1)) . . . When we run this code, all lines will try to run same time or will not wait for First Query to be completed. And it will rise “vDS1 does not exist”.

How to make sure once first query is completed then only we need to run second query ? We hope our question is clear.

I think the issue here is system.db.runQuery() returns a PyDataSet, and getValueAt() only works with Dataset. Try this instead:

vDS1 = system.db.runQuery("SELECT * FROM Table1;") vValue1 = vDS1[2][0] vDS2 = system.db.runQuery("SELECT * FROM Table2 WHERE Col1 = %s;"%(vValue1))

Thanks James.

We got solution for our issue. Our logic working fine now.