<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - property "TypeName" of a com.sun.star.sdb.ODataColumn is not available"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=114464">114464</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>property "TypeName" of a com.sun.star.sdb.ODataColumn is not available
</td>
</tr>
<tr>
<th>Product</th>
<td>LibreOffice
</td>
</tr>
<tr>
<th>Version</th>
<td>3.5.7.2 release
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>UNCONFIRMED
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>BASIC
</td>
</tr>
<tr>
<th>Assignee</th>
<td>libreoffice-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>userxyz@mailbox.org
</td>
</tr></table>
<p>
<div>
<pre>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</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>