>* >* For example: >* >* lcODBCDriver "Microsoft ODBC for Oracle" >* lcSettings "DSN=Locator"+chr(0); >* +"Description=Region 6 Locator"+chr(0); >* +"Server=OraServer"+chr(0); >* +"UID=optional" >* >if parameters() <> 2 > return .f. >endif >if type("lcODBCDriver") <> "C" or empty(lcODBCDriver) > return .f. >endif >if type("lcSettings") <> "C" or empty(lcSettings) > return .f. >endif >if right(lcSettings, 1) <> chr(0) > lcSettings = lcSettings + chr(0) >endif >#define ODBC_ADD_DSN 1 && included so you know what >#define ODBC_CONFIG_DSN 2 && can be passed as 2nd parameter >#define ODBC_REMOVE_DSN 3 >#define ODBC_ADD_SYS_DSN 4 >#define ODBC_CONFIG_SYS_DSN 5 >#define ODBC_REMOVE_SYS_DSN 6 >#define ODBC_REMOVE_DEFAULT_DSN 7 >DECLARE Integer SQLConfigDataSource in odbccp32 ; > Integer, Integer, String, String >lnSuccess=SQLConfigDataSource(0,ODBC_ADD_DSN,lcODBCDriver,lcSettings) >return iif(lnSuccess > 0, .t., .f.)Even though I've already got this working, you've saved me the trouble of find the constants. Thanks (once more) Mark.