Include .odb to Extension and access to it

I want to create an odb file and a BASIC macro to access .odb, and distribute it as an extension.
How do I write the file path to connect to the .odb stored in the installation directory and execute the SQL?

oTempName = ConvertToUrl("??Inner Extension path??/ipamj.odb")
oBaseContext = CreateUnoService("com.sun.star.sdb.DatabaseContext")
oDB = oBaseContext.getByName(oTempName)
oCon = oDB.getConnection("", "")

I found a way :slight_smile:

oTempName 	= ConvertToUrl("vnd.sun.star.extension://IPAmj/ipamj.odb")
oPMF 		= GetDefaultContext().getByName("/singletons/com.sun.star.deployment.PackageInformationProvider" )
sExPath 	= oPMF.getPackageLocation("IPAmj.addin") 'ExtensionID is registered by the identifier tag in description.xml.

oTempName = ConvertToUrl(sExPath & "/IPAmj/ipamj.odb")
oBaseContext = CreateUnoService("com.sun.star.sdb.DatabaseContext")
oDB = oBaseContext.getByName(oTempName)
oCon = oDB.getConnection("", "")