Skip to Content.
Sympa Menu

freetds - Re: [freetds] db-lib: support for new MS SQL 2008 data types

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddy77 AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] db-lib: support for new MS SQL 2008 data types
  • Date: Thu, 3 Apr 2014 22:16:59 +0100

2014-04-03 12:48 GMT+01:00 LacaK <lacak AT zoznam.sk>:
> 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.
>
> --- 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.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:
>


Looks ok and compile correctly. I actually launched some tests. Can
you add just a comment for the commit. I'll commit with your name.
Which name/mail address do you want in the commit, Something like
"Name Surname" <yourmail@domain>

Frediano




Archive powered by MHonArc 2.6.24.

Top of Page