This project builds a tool that connects to a database using ODBC, and gets a list of the tables in the connected database. For every table, it will extract all of the data in the table, and write it into an XML file. Each table will be stored in a separate file, which will have the name of the table, and extension .xls.
The command-line tool, called Dump2XML, takes 2 parameters: the connection string, and the directory where to write the XML files, like so:
Dump2XML "DSN=myDSN;Uid=me;Pwd=me;" C:Export
All datetime fields must be written in proper XML format (i.e. in 2006-12-31T00:00:00 or 2006-12-31T00:00:00+0100 notation). Characters that are not allowed in XML format must be converted to their HTML equivalent (for instance, "<" becomes "&lt;"), to ensure that the resulting XML is easily parsed by other software. Each file will be a well structured XML document, with a root element.
The tool will also write a file [url removed, login to view], which will contain a list of all the columns of all the tables the result of the first step of getting the list of tables).
The tool will further write a file [url removed, login to view], which writes a log that keeps a record of when the extract of a table was started, and when it was completed. If errors occured, the log will reflect those as well. Sample files of [url removed, login to view] and [url removed, login to view] can be provided.
The tool will work with older ODBC connectors, and therefor use of .NET is not allowed. The code must be written in C++, and use Win32 calls.
For your training and instruction, you can find excellent, well structured and well working C++ code in the application QTODBC ([url removed, login to view]), for which the source code can be found at [url removed, login to view] Please note that the classes MAY NOT be copied into the source code provided, because this would be a copyright violation. You are required to write your own code, but having working sample code may help you to understand the issues and their solutions better.
The developer for this project will work autonomously. Project oversight will consist only of testing the result against a number of ODBC connections, and inspecting whether copyrights were violated in the code.