rs.ColumnType return -1


I have a web application which make use of MySql as database back end. For some reason, I need to know the datatype of each field when retrieving a record. As described in the doc, rs.ColumnType returns 3 for integer, 5 for text etc… However, I have a field with type decimal (or numeric) with precision, Xojo returns -1 to me (supposed to be 13). I am using 2016r3, any ideas?


Wrong index (ColumnType is zero-based)?

Or maybe this: incorrect determining column type from mysql server

xojo database plugins are very “sparse” about the fields types.
it’s ok for a simple request, but if you need to know exactly the type of the fields
then you’ve better parse yourself the sql definition of the table
it’s quite easy to do with some regex.

Index is correct, maybe this is a bug as Norman filed the case #40304 in Aug 2015. It seems that it is not being fixed yet :frowning: