Re: SQLDescribeParam ?
"James K. Lowden" <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <[email protected]> |
On Sun, 30 Sep 2012 20:57:43 +0200 Björn Lundin <[email protected]> wrote: > Anyway, my real problem is that when I have a DateTime2(3) column, > SQLDescribeParam returns > * SQL_VARCHAR > > with MS native windows driver I get one of (not sure which, I treat > them equally) > * SQL_TYPE_TIMESTAMP > * SQL_DATETIME > > Is there a way around this, to tell the client library to return a > correct datatype? The library reports what it received from the server. The server converted the SQL DATETIME2(3) datatype of the column to varchar for compatibility with the TDS version you're using. If you check with TDSDUMP, I believe you'll find you're connecting with TDS 7.2. The first version of the protocol to support DATETIME2 is TDS 7.3. The current release, 0.91, doesn't support TDS 7.3; to get that, you'll need to use a recent snapshot. (The snapshots are once again broken. I haven't had a chance to figure out why. To get the absolute latest, you need git.) Hoppas det blir klart. --jkl