I'm using ultraliteJ version: 12.0.1 ebf: 3605. I got a problem when I try to get the ordinal position of a duplicated column when the table on the query has an alias. Below I will give some examples to explain it more:
My query: "SELECT idState, idState as state2 FROM bzState s" -> If I try to use this sentence rs.getOrdinal("idState"); (after executing and fetching the row) I get the error -143 (column not found). And if I remove the table alias (in my case the 's' value) the getOrdinal works without a problem.
Is there a limitation on ultraliteJ on this case?
asked 17 May '12, 15:08
That would seem to be a problem with the UltraLite C runtime. I expect the same result would occur if you used ULResultSetSchema::GetCoulmnID in the UltraLite C++ API. (This is what UltraLiteJ on Android uses).
Another workaround I could suggest is changing your query to
SELECT idState as state1, idState as state2 FROM bzState sYou could then retrieve the position of the first column with
I will add the issue to a list to investigate, but it will be low priority since there are workarounds.
answered 18 May '12, 13:55
Hello, I had the same problem, but in my case I needed a table alias to do a join. I fixed my problem changing the table alias for the name of table, for example:
SELECT bzState.idState, bzState.idState as state2 FROM bzState
answered 10 May '13, 07:23