Re: 2008 Data Types For DBLIB
Ken Collins <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <[email protected]> |
On Jul 28, 2011, at 5:06 PM, James K. Lowden wrote: >> Does anyone think they will be needing or working on supporting these >> data types [date], [datetime2], [datetimeoffset], and [time] using >> DBLIB? Right now they come back to me as SYBTEXT > > Needing, yes, working on, no. > > It's not a db-lib issue. It's a protocol issue: unless the client > defines itself as using TDS 7.3, the server returns those types as > varchar strings. The client never sees tbem in binary form. > See my message of 11 May 2011, "What's new list in FreeTDS 0.91 and > 0.92". That's fine. I can parse the strings and do something meaningful for the time being, but I can not find a way to get the column type. For instance, the dbprtype() just returns "char" for these columns and dbcolutype() just returns 0/null. Any work arounds for a DBLIB interface to get something back like "datetime2" for the column name or something that let's me switch and parse the varchar string? - Ken