https://bugs.documentfoundation.org/show_bug.cgi?id=114464
Bug ID: 114464
Summary: property "TypeName" of a com.sun.star.sdb.ODataColumn
is not available
Product: LibreOffice
Version: 3.5.7.2 release
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: BASIC
Assignee: [email protected]
Reporter: [email protected]
For any ResultSets of a database query
Database (external): postgres
Tested on Linux and Windows
The application failed to give you the TypeName for a column.
(The TypeName gives you the Datatype for the specified column.You need the
TypeName to execute later the right method ...getString, getLong etc.)
This behavior only occurs for the first column in the first row of a ResultSet.
For the next columns in the ResultSet or the next rows it works.
DIM sRow AS STRING
DIM oRow AS OBJECT
while oResult.next
sRow = oResult.columns.ElementNames(0) 'First Column Name of the
ResultSet
oRow = oResult.columns.getByName(sRow) 'access to a
com.sun.star.sdb.ODataColumn
print oRow.TypeName 'empty, although I got the
column
WEND
REM Workaround: insert a line with the instruction
com.sun.star.sdb.ODataColumn.Type
while oResult.next
sRow = oResult.columns.ElementNames(0)
oRow = oResult.columns.getByName(sRow)
oRow.Type 'inserted here an instruction
print oRow.TypeName 'now it works
WEND
--
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