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: [email protected]
Reporter: [email protected]
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._______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs