Apache OpenOffice (AOO) Bugzilla – Issue 114905
ExecuteQuery does not work when called from a Basic macro
Last modified: 2010-10-05 07:53:02 UTC
I have a database "Dialysis" built in OOO base 3.2.1 running under Linux Ubuntu 10.04.1. I have a Basic macro "Updatelatest". This macro calls a another macro "CreateStatement2(). In "createStatement2()", I create a connection to "com.sun.star.sdb.DatabaseContext". If I perform an executequery(strSQL) from within macro "CreateStatement2(), I receive an error 423: Property or method not found: next. This only occurs from OOo Basic under Ubuntu Linux. If I run this macro from Windows Vista, it works as expected.
Created attachment 71928 [details] Database Dialysis
You use OOo from OOo site or you use ubuntu version?
I upgraded to OOo 3.2.1 from http://ppa.launchpad.net/openoffice-pkgs/ppa/ubuntu repository on my Ubuntu 10.04.1. I would be willing to remove my version and install from OOo site if you think that makes a differeence.
I am able to reproduce these symptoms with OOo 3.2.1 running under Windows Vista. I was able to reproduce these symtoms with OOo 3.2.1 running under Ubuntu 10.10 (Maverick) Live CD.
I made two changes to the macro CreateStatement2(): 1) corrected reference from "strSQL" to "SQL". (This did not correct the problem), 2) Set a variable "Result" to the "stmt.executeQuery(SQL)", and referenced "Result.next()". This last action corrected the problem. I have marked the issue "invalid". Sorry for bringing up this issue.
Invalid -> closing.