Customizing ecpSE and ecpSEa


<= previous ^ top next =>

Options

The two parts of ecpSE that can be easily changed are the data access and error checking parts.
To customize one can simply use ADO 2.5 and change the DSN. ecpSE uses DSN-Less connection to make this simpler (and to speed the code execution). In the ecpSEa.py file make sure that a_info['db_obj'] equals 'ADO25'. Also set a_info['dsn'] equal to your desired connection string. In theory this should work for any ODBC/OLEDB database ... maybe. [ecpSE's next revision (0.4) will also let these options be defined when ecpSEa is created.]

The second type of customization is in defining new error handlers. To do this add a new method to class CheckErr in ecpErr.py . It should be of the form def Err_Name(self, Param, Data):. If there is an error the first character of the return should be a pipe (|) followed be an error message. If there is no error found, the return should be the data itself. Error checking is called with Python's exec function so use the name in the ParamList. You should lastly add lines like

elif string.upper(Type) == 'Err_Name':
    self.ER = 0 # Returned for no errors in Param definition, add stuff to check for errors in definition too (return 1 for errors)
to the Check method of class CheckParam:

Feedback

If you have any stories of either success or failure with this program please contact me at dsavitsk@e-coli.net. Also, if you need help setting it up or configuring things, please let me know.

<= previous ^ top next =>