I want to use sqlncli.h
but only if it is available to the user, and if not, I want to use less optimal but functional replacement code (I really just want to use Multiple Active Result Sets, other DBMSes don't seem to require special configuration for this).
The user will have the source files, and will be building it themselves on their machine, so can I use some sort of preprocessor/conditional compilation flag to handle this?
I know there are flags like _WIN32
I can use to check if the user is on windows (which I do, because windows users need windows.h
to use my code).
This is a general purpose ODBC lib so I don't know whether a user will even be connecting to SQL Server or not.
Is my only option to have the user specify whether or not they want to use SQL Server+Native Client (by defining some flag for example)