Bug 131449 - SQL commands do not work in MACRO Basic, but does work through Tools/SQL with Firebird embedded
Summary: SQL commands do not work in MACRO Basic, but does work through Tools/SQL with...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
6.4.2.2 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-20 17:57 UTC by putmann1013
Modified: 2021-03-05 15:35 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description putmann1013 2020-03-20 17:57:16 UTC
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
Comment 1 himajin100000 2021-03-05 15:35:47 UTC
the reporter changed the status to RESOLVED FIXED, but as the commit was not identified, I believe this bug report should be marked WORKSFORME