You can probably do it directly from kix. Here is a link to a script to do it in basic.

http://support.microsoft.com/kb/q184608/

This is using a gui. You could use kixforms, or since you know the data for the DSN, you could just pass it to it (maybe put it in a ini file so that the code is generic).

Regards,

Brad