Using a split database, I am trying to run a text file containing an sql command using a push button in a form.
Here the macro:
sub dosql
if IsNull(ThisComponent.CurrentController.ActiveConnection) then
ThisComponent.CurrentController.connect
endif
txtfile="/home/xxxx/Desktop/sqls.txt"
f1 = FreeFile()
Open txtfile for Input as #f1
Do while NOT EOF(f1)
Line Input #f1, s
rem MsgBox(s)
oStatement = ThisComponent.CurrentController.ActiveConnection.createStatement()
oStatement.execute(s)
Loop
end sub
When I run this macro using the Tools, Macros, Run Macro command, it works.
However, when I assign this macro to a push button in a form. I get the following:
When I check to see if there is an active connection in the database by right clicking on the main screen on the Database connection I get this: Error code: 1000
The driver class ‘org.hsqldb.jdbcDriver’ could not be loaded.
Maybe that is part of the problem. Please excuse my ignorance.