on 2012 Jul 23 3:36 PM
I'm using ultraliteJ for Android version 12.0.1 build 3726.
My client has used a specific query** that didn't return the column name from the resultSetMetadata when used this ultralite commands: getAliasName / getTableColumnName.
I managed to get the name using the getWrittenName, but my doubt is if the getTableColumnName should have worked. On the InteractiveSQL the column name is shown.
** Query used. SELECT PublicationID, PublicationType from ( SELECT 0, 'All Database' UNION SELECT 1, 'All Publications' UNION SELECT 2, 'BIZ' UNION SELECT 3, 'COMMOM' UNION SELECT 4, 'FUSION' UNION SELECT 5, 'MESSAGE' UNION SELECT 6, 'MQUEST' UNION SELECT 7, 'MSALES' ) AS mn (PublicationID, PublicationType)
tks
Renato,
While this answer may not be totally satisfying, I can say that this is expected behaviour given what the UltraLite C runtime returns for this query. The method getTableColumnName calls
ULResultSetSchema::GetColumnName(cid, ul-name-type-base-column )(see http://dcx.sybase.com/index.html#1201/en/ulc/ulc-ulcpp-ulcpp-h-fil-ul-column-name-type-enu.html). This call returns null because there is no underlying base table for this query. The method getAliasName uses the same UltraLite C call if the column is aliased.
The method getWrittenName calls
ULResultSetSchema::GetColumnName(cid, ul-name-type-sql )This call works with SELECT statements, without an underlying base table.
Thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
73 | |
10 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.