[Libreoffice-bugs] [Bug 114464] New: property "TypeName" of a com.sun.star.sdb.ODataColumn is not available
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Thu Dec 14 14:05:11 UTC 2017
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: libreoffice-bugs at lists.freedesktop.org
Reporter: userxyz at mailbox.org
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20171214/5cba3e4d/attachment.html>
More information about the Libreoffice-bugs
mailing list