db-lib: support for new MS SQL 2008 data types

LacaK <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
Hi,
I start with first, very small, steps to add support for DATE, TIME and 
DATETIME2 data types to db-lib.
I attach patches for:
- src/dblib/dblib.c
- src/tds/token.c
let me please know if you can accept (and commit) them.
Then I will try do further steps.
Thanks
-Laco.

_______________________________________________
FreeTDS mailing list
[email protected]
http://lists.ibiblio.org/mailman/listinfo/freetds
token.c.diff (text/plain, 274 B)
--- token.c.ori	Thu Apr 03 13:32:02 2014
+++ token.c	Thu Apr 03 11:04:48 2014
@@ -3016,6 +3016,7 @@ tds_prtype(int type)
 		TYPE(XSYBVARCHAR, "xvarchar");
 		TYPE(SYBMSDATE, "date");
 		TYPE(SYBMSTIME, "time");
+		TYPE(SYBMSDATETIME2, "datetime2");
 	default:
 		break;
 	}
dblib.c.diff (text/plain, 711 B)
--- dblib.c.ori	Mon Mar 31 22:34:14 2014
+++ dblib.c	Thu Apr 03 13:39:42 2014
@@ -224,6 +224,9 @@ DBVERSION_71;
 #ifdef TDS72
 DBVERSION_72;
 #endif
+#ifdef TDS73
+DBVERSION_73;
+#endif
 
 
 static int
@@ -942,6 +945,9 @@ dbsetlversion (LOGINREC * login, BYTE ve
 	case DBVERSION_72:
 		tds_set_version(login->tds_login, 7, 2);
 		return SUCCEED;
+	case DBVERSION_73:
+		tds_set_version(login->tds_login, 7, 3);
+		return SUCCEED;
 	}
 	
 	return FAIL;
@@ -5761,7 +5767,9 @@ dbsetversion(DBINT version)
 	case DBVERSION_46:
 	case DBVERSION_100:
 	case DBVERSION_70:
-	case DBVERSION_80:
+	case DBVERSION_71:
+	case DBVERSION_72:
+	case DBVERSION_73:
 		g_dblib_version = version;
 		return SUCCEED;
 	default:
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.