At your program startup, browse thru all DSNs on the computer (use function in "ODBC32.DLL"), compare your DSN name with these DSNs then you can tell whether the DSN is created already or not.

Regards,
TheBao