Examples
A. Create a data source using SQLConfigDataSource
#include <stdio.h>
#include <windows.h>
#include "sql.h"
#include <odbcinst.h>int main()
{
RETCODE retcode;UCHAR   *szDriver = "SQL Server";
UCHAR   *szAttributes =
"DSN=MyDSN\0DESCRIPTION=SQLConfigDSN Sample\0"
"SERVER=MySQL\0ADDRESS=MyServer\0NETWORK=dbmssocn\0"
"DATABASE=pubs\0";retcode = SQLConfigDataSource(NULL,
                       ODBC_ADD_DSN,
                       szDriver,
                       szAttributes);