Ask Your Question
0

LibreofficeBase: how to execute SQL from BASIC script [closed]

asked 2013-08-07 17:45:46 +0100

Python gravatar image

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.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2015-11-07 23:33:53.696427

1 Answer

Sort by » oldest newest most voted
1

answered 2013-08-07 17:49:43 +0100

Python gravatar image

updated 2013-08-07 17:50:33 +0100

From googles cached page of http://ooo-forums.apache.org/en/forum/viewtopic.php?t=42882&p=197875

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

REM execute!
Dim oStatement As Object
oStatement = ThisComponent.CurrentController.ActiveConnection.createStatement()
oStatement.execute("SOME SQL COMMAND")
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-08-07 17:45:46 +0100

Seen: 2,567 times

Last updated: Sep 06 '13