LO Base 6.3 Firebird embedded on Linux Mageia 6 , odb OLVvS is registered.
I have created in my odb a form with a button that calls upon a macro to insert some values in another table than the subject table of the form.
This works perfectly OK with the macro inside the odb.
Now I want to run this form ad a standalone form (the odt is in the same directory as the odb), and I copied the macro to My Macros.
Now when I press the button in the standalone form I get the error "Object variable not set, and I get highlighting on the Datasource assignment.
The code goes:
Sub Archiveerlid
Dim DatabaseContext As Object
Dim DataSource As Object
DatabaseContext = createUnoService("com.sun.star.comp,sdbc.firebird,Driver")
DataSource = DatabaseContext.getByName("OLVvS")
oConn = ThisDatabaseDocument.DataSource.getConnection("","")
oQuery = oConn.CreateStatement()
etc…
As this is my first attempt at developing an odb application, I’m stuck here, i need some clarification.