I'd like to compare two QueryResultsets of bibliographies (old&new with almost identical content but different table structure) from different tables, matching the ids of both tables to determine aquivalent records.
Here my code until now ...
http://pastebin.com/aWXAzhdZ
Problem is, I think, the exit condition (break) in the last "if". I'd like to catch the case when res_new.nextRow() comes to the last row of resultSet_new (the new bibliography). (I'm not sure if this "if" is necessary, for it might be caught by the while-condition becoming false..?!)
However if this "if" is necessary, I need "res_new.currentRow()" working, but what I get is:
if res_new.currentRow() == 551:
TypeError: 'int' object is not callable
551 for the time being the number of rows, because I couldn't make working maxRows() either.
I think, I have a pretty huge misconception (or no conception at all) about the underlying entanglements of wb and python scripting regarding: why is that I can use res_new.nextRow() but not res_new.currenRow()/maxRows() ? Or did I make another mistake?
Any reflections and/or help appreciated.
On the other hand I must say, I am really thrilled by the use of wb and the possibilities of scripting, being able to 1) extract specific records of my table (where x like ...) into the Query-Result-Editor, 2) alter this Query-Result by scripts, 3) watch over these changes in the editor and finally commit my changes with "Apply". This makes a wonderful tool and I'd like to experiment further. Thank you!
ps: This phorum should have a funtion for formatting code, right?!