1

I have an SQL query which I want to run when a button in my OpenOffice Calc worksheet is pressed. I've found out how to bind a macro to the button, but I can't get a connection to the database it seems (I've created an .odb file and I can run the query from within OpenOffice Base).

How do I tell OpenOffice Calc which connection to use and which query to execute?

Jdv
  • 962
  • 10
  • 34

1 Answers1

1

Create a connection to the .odb file as in my answer here.

Then perform a query using executeQuery() and getString() as shown here: https://wiki.openoffice.org/wiki/Documentation/BASIC_Guide/Database_Access

Community
  • 1
  • 1
Jim K
  • 12,824
  • 2
  • 22
  • 51