PROCEDURE GetAllUserDSN private oRegistry local lcRegSubKey, lcRegHKey, lnVals, laVals[1,2] oRegistry = This.oRegistry && the registry class use the oRegistry object lcRegSubKey = "Software\ODBC\ODBC.INI\ODBC Data Sources" lcRegHKey = HKEY_CURRENT_USER lnVals = oRegistry.GetEnumValues(@laVals, lcRegHKey, lcRegSubKey) IF lnVals > 0 ACOPY(laVals, This.aUserDSNs) ENDIF return lnVals ENDPROCModify the class to add the aUserDSNs property:
DEFINE CLASS ODBC as Custom *-- class property protected oRegistry && hold reference to the Registry class object oRegistry = .null. DIMENSION aUserDSNs[1] *--