All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
How to add a new type


Adding a new type in FreeTDS is a quite complicated task involving different tasks.

To see an example you can look at commit id adb893f1381fd3ea40564c775e30dc8cdc81dcf2 ("Implement big(date)time types") and parent changes in the source repository.

libTDS changes

ODBC changes

ODBC is the most complicated library to add a type to. Usually its data are different from libTDS so you have to add additional code for conversions which are not required by other libraries.

CT-Library changes

This is quite easy as usual the conversion in libTDS are fine for this library.

Cfr commit id c5e71e5ad4a557038ecedcec457e2531ab02a77b.

DB-Library changes

A bit more complicated than CT-Library but not that much.

Cfr commit id 99dd126e0eb248dd3079b2a7cf97437fe3bcd163.

Applications changes

datacopy application requires some changes too to support new types so add them to src/apps/datacopy.c.
Cfr commit id e59c48ac39c76abb036651f8ec238090eef321c9.