LibreofficeBase: how to execute SQL from BASIC script

I have an application where I need to execute a SQL command from BASIC script. I found how to do it not long ago, but now I cannot find it.

From googles cached page of

REM make sure your connected to the database
if IsNull(ThisComponent.CurrentController.ActiveConnection) then

REM execute!
Dim oStatement As Object
oStatement = ThisComponent.CurrentController.ActiveConnection.createStatement()
oStatement.execute("SOME SQL COMMAND")

In the latest LO I receive the error that “ActiveConnection” is an unknown property or method

Try this:

if IsNull(Thisdatabasedocument.CurrentController.ActiveConnection) then