Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Inserting Into DB
System
I am trying to insert the data captured by a
dct into db by calling a perl file from .tpl
database is oracle and the same pl is able to insert from CLT.
But while calling the same pl file from tpl it does not work.
Any clues or suggestion on this front.
A snippet from .tpl
<iw_system command="iwperl c:\dbaseinsert.pl" />
The situation is very critical.
Thanx in advance
Param
Find more posts tagged with
Comments
chandub
<iw_system command="iwperl c:\dbaseinsert.pl" />
try changing the above command giving the full path of iwperl
somthing like below.
<iw_system command="c:/iw-home/iw-perl/bin/iwperl c:/iw-home/bin/xyz.ipl" />
2)
also try with saving the file as .ipl instead of .pl
3)
also check with iw_system
Chandra
Adam Stoller
If I read your post correctly - the script runs fine from the command line, but fails to connect to the server when run from within a presentation template - yes?
If so - I think there have been other threads on this in these forums, but essentially what is most likely happening is that some of the environment variables available from the command line are *not* available when running the script from within the PT.
Basic process of resolving is to create a real simple perl script that just dumps out the environment variable information (into a file) - run it from the command line, run it from within your PT - and compare the output.
Once you figure out which envrionment variables are [probably] needed, then adjust your perl script to include a BEGIN{...}; block in which you explicitly set those environment variables.
This *usually* solves this kind of problem
--fish
(Interwoven Senior Technical Consultant)