Android Question Types of columns in Cursor (SQL Library)

b4auser1

Well-Known Member
Licensed User
Longtime User
Erel,

Thank you for hint, but I didn't find in the example, what I am looking for :(
You used "PRAGMA table_info" to get info about columns in a table, not in Cursor, which can be built as SQL QUERY from several tables and with SUM(), Group By and etc.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Then you have to send out more than one pragma if you want to know more about the types. I think that´s so in any sql-language...
 
Upvote 0

fbritop

Active Member
Licensed User
Longtime User
Which class should I use for getType?

I'm trying:

B4X:
Dim jo As JavaObject
jo.InitializeStatic("android.database.AbstractWindowedCursor")
Log(jo.RunMethod("getType", Array(cursor,index)))

Where index is the column index, but it states an error: java.lang.RuntimeException: Method: getType not matched.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

fbritop

Active Member
Licensed User
Longtime User
Just answer myself....

B4X:
Dim r As Reflector
r.Target=cursor
Log(r.RunMethod2("getType", index, "java.lang.int"))
 
Upvote 0
Top