NetTalk Central
		NetTalk Web Server => Web Server - Ask For Help => Topic started by: Rob Kolanko on October 12, 2015, 10:37:05 PM
		
			
			- 
				Hi,
 I would like to use Clarion database triggers to execute code whenever certain tables are maintained. This code will need the to use the Nettalk web handler (p_web) methods.  I think that this can only be done by creating a new file manager class and and a new relation manager class, where the all database methods would need a web handler parameter. Is there an easier way?
 
 Thanks
 Rob
- 
				There is, and I think this will work... But I haven't tried it so tread carefully.
 
 Create a global, threaded (very NB, must be threaded), variable of reference to NetWebServerWorker
 let's call it pp_web
 so the declaration is
 
 pp_web  &NetWebServerWorker,THREAD
 
 then in WebHandler, immediately after the CODE statement -
 
 pp_web &= p_web
 
 then in your triggers you can reference pp_web and everything should be ok.
 
 cheers
 Bruce
 
 
 
 
- 
				I have a problem with the proposed method.
 
 pp_web &= p_web
 
 does not compile after the CODE statement in the web handler, because the p_web is not the name of the NetWebServerWorker class in WebHandler. But
 
 pp_web &= ThisNetWorker
 
 seems to work fine.
 
 I have not had the time to figure out why thread pools do not work in my applications yet, but this will be something else to check when I get around to it.
 
 Rob
- 
				Hi Rob,
 
 you can (and probably should) rename the worker object from ThisNetWorker to p_web on the NetTalk extension on that window. p_web has been the default for a long long time now, although the original default was ThisNetWorker.
 
 There are some advantages when it comes to generated code with having it set as p_web.
 
 Cheers
 Bruce