Introduction to writing C-language routines

If your repository contains user-defined fields—fields created as user type fields in S/DE Repository—you can write C language routines to manipulate user-defined field data as it’s read from and written to the database. (This is similar to creating user-overloadable ReportWriter routines.) For example, if a user-defined field stores street addresses in mixed-case characters, and you want the xfODBC driver’s output to be in all uppercase characters, you can create a routine to convert the addresses as they’re read from the database. And if you want the addresses converted to mixed-case characters as they’re input, you can also create a routine to do that.

To create a user-defined data routine,

These are the files that the xfODBC driver calls for user-defined data routines. The bitness of the file (32 or 64) must correspond to the bitness of the Connectivity Series installation. These files must reside on the same machine as the data. For client/server configurations, the file must reside on the server.

To help you learn to create your own user-defined data routines, we’ve created a tutorial that steps you through the process; see Tutorial: Using xfodbcusr.c as an example. And see Using xfodbcusr.c as a template to create user-defined data routines for information on xfodbcusr.c, a C language source file that you can use as a template for your user-defined data routines. Note the following: