Building ECL datasets from ODBC data sources

This program includes a C++ header file and an ECL file. The header file “hpcc-odbc.h” needs to be installed in your system in a location that is in your default include path. Typically, on linux systems, /usr/include is a safe bet. Non-default options can also be accommodated by special compiler options given in the ECL code. The ECL file “ODBC.ecl” contains the embedded C++ snippet in a BEGINC++ structure which gets data from the ODBC source and serializes it into the ECL dataset. The layout of the resulting dataset is also specified in the file. The file contains an action at the end which makes it a runnable file. The action assumes you have an ODBC DSN called ‘MySQL-Test’ which contains a table called ‘hotlist’. You can change the name of the DSN and the SQL statement to whatever you like. KNOWN LIMITATION: The code is known to freeze at times in a locked state when executing multiple SQL statements in parallel with connection pooling configured to be ON in the system ODBC configuration. If you experience this, try turning off your connection pooling, or change your driver threading level.