https://bugs.documentfoundation.org/show_bug.cgi?id=155204
Bug ID: 155204
Summary: BASIC SF GetRows treats an empty result as an error
Product: LibreOffice
Version: 7.5.1.2 release
Hardware: x86-64 (AMD64)
OS: Windows (All)
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: BASIC
Assignee: [email protected]
Reporter: [email protected]
Created attachment 187156
--> https://bugs.documentfoundation.org/attachment.cgi?id=187156&action=edit
Sample document
Steps to reproduce
1 have base document with
1.1 with a table
1.1.1 with content
KategorieID | KategorieName
1 | red
2. have macro
Sub Main
GlobalScope.BasicLibraries.loadLibrary("ScriptForge")
DIM oDoc AS OBJECT : oDoc =
CreateScriptService("SFDocuments.Document",ThisDatabaseDocument)
DIM oDB AS OBJECT : oDB = oDoc.GetDatabase()
Dim queryResults as Variant
queryResults = oDB.GetRows("SELECT * FROM [Kategorien] WHERE
[KategorieName] = 'red'") ' works as expected
queryResults = oDB.GetRows("SELECT * FROM [Kategorien] WHERE
[KategorieName] = 'green'") ' crash
End Sub
3. Run macro
Expected behavior
GetRows returns array of records found. An empty array, if no records found
Actual behavior
GetRows creates a popup window complaining about a crash, if no records found /
empty result set
--
You are receiving this mail because:
You are the assignee for the bug.