[Libreoffice-bugs] [Bug 131449] New: SQL commands do not work in MACRO Basic, but does work through Tools/SQL with Firebird embedded

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Fri Mar 20 17:57:16 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=131449

            Bug ID: 131449
           Summary: SQL commands do not work in MACRO Basic, but does work
                    through Tools/SQL with Firebird embedded
           Product: LibreOffice
           Version: 6.4.2.2 release
          Hardware: x86-64 (AMD64)
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Base
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: putmannFB at gmail.com

Description:
DROP Table or Delete From (SQL Commands) do not work properly from Macro BASIC
within a menu button because the dropped table still exists in the database
after pressing button. However, when the menu button to DROP Table is pressed a
2nd time an error message appears stating the table does not exist.
The table does exist

example
Sub UpdateWinners
REM INSERT RECORDS INTO DATABASE TABLE
Dim Context As Object
Dim DB As Object
Dim Conn As Object
Dim Stmt As Object
rem Dim Result
Dim strSQL As String
Context=CreateUnoService("com.sun.star.sdb.DatabaseContext") '< get  the
database context
DB=Context.getByName("Baseball Stats") '<- change database name
Conn=DB.getConnection("","") '<-  default blank
Stmt=Conn.createStatement()

strSQL = " DELETE From ""tblWorldSeriesWinners"" "
Stmt.executeUpdate(strSQL) '<- delete the Winners table


Actual Results:
Nothing/No Error

Expected Results:
Dropped table


Reproducible: Always


User Profile Reset: No



Additional Info:
Dropped table

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200320/4d71da66/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list