Re: db-lib: support for new MS SQL 2008 data types - part 3
Frediano Ziglio <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <CAHt6W4d-HgvLNB42LmNcAzOgG=sw5rOHLeGYRNkhXaKG7V8Aug@mail.gmail.com> |
2014-04-16 12:44 GMT+01:00 LacaK <[email protected]>: > Hi again, > Now I am personally happy with patched db-lib in regards of support new DATE > - TIME data types. Great! Yesterday I discovered a problem with BCP adding some tests for these new types, still to fix. > But there are still missing some parts, which may be interesting to somebody > else. > I meant dbbind() family of API with corresponding *BIND constants and binary > structure used to store this types. > > How to handle binding of new date, time types ? > > - introduce new DBDATETIMEALLBIND (or DBDATETIME2BIND) constant in sybdb.h ? could work > - introduce new DBDATETIMEALL struct (==TDS_DATETIMEALL struct) in sybdb.h > ? Mmm... well... could be or not. Microsoft for ODBC defined quite different structures (one more similar to DBDATEREC). TDS_DATETIMEALL is neither from TDS protocol neither intended to be presented to clients. It's a mix of TDS protocols, numeric, old dates (values are the same as dtdays). On the other end I could understand that providing dbdata different from libTDS is far from easy. > - add support to copy_data_to_host_var() function in dblib.c ? > Ehmm... what do you mean? > If you give me direction I can prepare patch ... > (if it is good idea add support for BINDing ?) Not good, excellent! And much easier as you don't have to store a buffer but you can provide what do you want to the client. > Thanks > -Laco. Frediano