How to fix :“Not Enough Stack Memory” when trying to load() with OfficeDatabaseDocument UNO service

I try to familiarize myself with the usage of Macro and UNO API on LibreOffice Base, i tried to open my .odb file with the UNO OfficeDatabaseDocument (DOC here : LibreOffice: OfficeDatabaseDocument Service Reference ) to play with UNO and learn to use them.

Function MyClubOfficeDatabaseDocument()
  Dim MyClubURL(0) As New com.sun.star.beans.PropertyValue
  MyClubURL(0).Name = "Chemin d'accès vers la base de donnée MyClub"
  MyClubURL(0).Value = "/Users/faisalsalhi/Desktop/MyClub/MyClub.odb"

  MyClubOfficeDatabaseDocument = CreateUnoService("com.sun.star.sdb.OfficeDatabaseDocument")
  MyClubOfficeDatabaseDocument.load(MyClubURL)
End Function

I tried to execute this macro inside my odb file.

Hello,

In past have only used com.sun.star.sdb.OfficeDatabaseDocument for verification of document type looked at.

A much simpler manner to open a document:

TargetURL = convertToURL(fileLocation)
TestDoc = StarDesktop.loadComponentFromURL(TargetURL, "_blank", 0, Array())

where fileLocation is your file such as:

fileLocation = "/Users/faisalsalhi/Desktop/MyClub/MyClub.odb"