Customizing wconnect.h settings the easy way
A new Web Connection installation tends to overwrite your wconnect.h file along with any custom settings you've made to it, so it's usually a good idea to store changed settings separately from wconnect.h. DO NOT CHANGE SETTINGS DIRECTLY IN WCONNECT.h!
wconnect.h includes a reference to an override header file that you can use for this purpose with the following line:
#IF FILE("WCONNECT_OVERRIDE.H") #INCLUDE WCONNECT_OVERRIDE.H #ENDIF
wconnect_override.h should then contain #UNDEFINE statements for all constants you want to change along with #DEFINE statements for the new values. You can do this as follows:
#UNDEFINE DEBUGMODE #DEFINE DEBUGMODE .F. #UNDEFINE MAX_TABLE_CELLS #DEFINE MAX_TABLE_CELLS 20000 #UNDEFINE WWC_CACHE_TEMPLATES #DEFINE WWC_CACHE_TEMPLATES 0 #UNDEFINE VISUALWEBBUILDER #DEFINE VISUALWEBBUILDER .F. #UNDEFINE WWC_USE_SQL_SYSTEMFILES #DEFINE WWC_USE_SQL_SYSTEMFILES .F. #UNDEFINE WWSTORE_USE_SQL_TABLES #DEFINE WWSTORE_USE_SQL_TABLES .F. #UNDEFINE WWMSGBOARD_USE_SQL_TABLES #DEFINE WWMSGBOARD_USE_SQL_TABLES .F.
When an upgrade rolls around Web Connection will overwrite your wconnect.h, but the settings in wconnect_override.h remain intact.
wconnect_override.h in multiple ProjectsNote that wconnect_override.h is specific to each application/exe you build most likely with settings that are specific to that project. If you have multiple projects and they use different settings make sure you have separate copies of wconnect_override.h. The best way to do this usually is to have separate folders where application specific files resides and you can put wconnect_override.h in that folder. Then ensure that the right wconnect_override.h is in your path and in your path before the default one so Foxpro find your custom version first.
Comment or report problem with topic