I'm using mysql database. If I use alias for a table column the resulset method "GetColumnName" give me the original column name instead of alias. it is normal ?
Sub GetColumnLabel(rs As ResultSet, index As Int) As String
Dim jo As JavaObject = rs
Return jo.RunMethodJO("getMetaData", Null).RunMethod("getColumnLabel", Array(index + 1))
End Sub
You can include this change in the jSQL library so that the method GetColumnName return the correct value when working with SQLite and MySQL?
I, at the time, I solved by changing DBUtils:
B4X:
For i = 0 To cur.ColumnCount - 1
Dim ColName As String
If DBType = DBMYSQL Then
ColName = GetColumnLabel(cur, i)
Else
ColName = cur.GetColumnName(i)
End If
cols.Add(ColName)
Next
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.