I have an SQL Update statement in macro that fires a Unexpected token: [ in statement [UPDATE ]
error even though I don’t see anything wrong. Here’s my code:
Conn2 = Db.getConnection("","")
strSQL2 = "UPDATE [Users] SET [Status] = 'on' where [ID] = 1;"
Stmt2 = Conn2.createStatement()
Stmt2.executeQuery(strSQL2) 'runtime gets interrupted here
'then fires the previously mentioned error
[Users]
is the name of my table and [Status]
is one of its columns.
Am I missing something here?
=========================
Version: 7.3.5.2 (x86) / LibreOffice Community
Build ID: 184fe81b8c8c30d8b5082578aee2fed2ea847c01
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-US (en_PH); UI: en-US
Calc: CL
DB in use: HSQLDB embedded