[Libreoffice-bugs] [Bug 114464] 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 Jun 6 11:01:20 UTC 2019
https://bugs.documentfoundation.org/show_bug.cgi?id=114464
userxyz at mailbox.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |UNCONFIRMED
Ever confirmed|1 |0
--- Comment #3 from userxyz at mailbox.org ---
REM You need a resultset oResult from a database query to reproduce this,
sorry...
Function Read_oResult(oResult AS Object)
'reads a ResultSet from a Database query and gives an array back (only the
first row of a resultset)
DIM var()
DIM count_columns AS Integer
DIM i AS Integer
DIM sDataTyp_Row AS String
DIM sName_Column AS String
DIM n as Integer
DIM count_rows as INTEGER
'retrieve the number of rows
oResult.last
count_rows = oResult.getRow
oResult.beforefirst
if count_rows = 0 then
Read_oResult = null
else
count_columns = oResult.columns.count
for i = 0 to count_columns-1
'see bugreport
ttps://bugs.documentfoundation.org/show_bug.cgi?id=114464
' inserted the next line with no use but only
if inserted, oResult.columns.ElementNames(i)).TypeName works
' I need the datatype later to read the data
with oResult.getInt...etc.
' to reproduce - just comment the next line
out
oResult.columns.getByName(oResult.columns.ElementNames(i)).Type
sDataTyp_Row =
oResult.columns.getByName(oResult.columns.ElementNames(i)).TypeName
print sDataTyp_Row
NEXT i
end if
' .....do more to read the resultset in var()
Read_oResult = var()
End Function
--
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/20190606/c2996cd5/attachment.html>
More information about the Libreoffice-bugs
mailing list