First of all, are you sure you have to connect through ODBC? can't you use SqlConnection objects?
If ODBC is required...
The ODBC profiles gets saved into registry folders (under
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources for machine shared profiles or
HKEY_CURRENT_USER\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources for user's private profiles) or as DSN files with any name and in any folder of your choice.
So, you can create and fill parameters for any of this containers (registry folder or DSN file) and then use
SQLDriverConnect Function.
You can also call this function specifying all connection parameters you like (and avoiding the creation of any profile).
The easiest way to know how to create and fill the ODBC profile is creating them form the control panel application and then inspecting their contents looking into the registry or DSN file.
You can also have a look at
ConfigDSN Function.