How to create ODBC DNS name from program

Can anyone show me how to create an ODBC DNS name (for Access database)
through program code ?

Thanks and best regards

Ken Choo