Unanswered: Sybase ODBC returning datetime as string, but saying it's a timestamp
I'm trying to query against Sybase ASE 15 using ODBC. A couple of the columns in the table have user-defined types that ultimately map to datetime, though the types have different definitions. When queried, ODBC indicates that both are SQL_TYPE_TIMESTAMP, so my program binds both as SQL_C_TYPE_TIMESTAMP. This works for one of the columns, but Sybase fills the other one in with a stringified date, instead. Needless to say, the result is a timestamp struct filled with gibberish.
The VDT_DATETIMESTAMP is the type that works. The other one, VDT_DATETIME, only works if you explicitly CONVERT it to datetime. Otherwise, as I said, it returns a string, but lies and says that it's a timestamp.
I looked for some way that my program could know to bind the two differently, not wanting to add some hack (which I could probably get to work).
I'm not sure why have Default_name set makes one of these work, and not the other. Can anyone shed light on this?