Works good when it has only few containers!, items! The values are returned to the callout pop-up window properly when the DCR is small. Otherwise it hangs.Please help.
HiA callout window from a DCR has to print 600 lines of data in html format from DB. Using perl DBI, the stored procedure returns the value to callout. But while printing the values in HTML, the iw-perl hangs on printing the records. Checked the db and the values are good.But the same code executes in command line and prints all the value. Is there any memory limit for iw-perl to execute?Env: Teamsite 6.5 sP 2Windows 2003Help please.ThanksJohn
I'd be interested in seeing the output from the command line when it hangs from the GUI - I'm guessing that there are one or more characters within the output that the shell doesn't mind but which HTML does - and you aren't properly encoding the value from the DB before presenting it within the HTML code.
while ( my @row = $sth2->fetchrow_array ){ my $id_subCompany; my $name_subCompany; $id_subCompany = $row[0]; $name_subCompany = $row[3]; encode_entities($name_subCompany); $printString .= "assToDCR(" . $id_subCompany . ");\">" . $name_subCompany . "\n";}
Thanks for your response. I have attached the output file into two part. Bz forum is not allowing to attach file more thank 36KB. So i splitted into two and attached.Callout Function Perl Part: while ( my @row = $sth2->fetchrow_array ){ my $id_subCompany; my $name_subCompany; $id_subCompany = $row[0]; $name_subCompany = $row[3]; encode_entities($name_subCompany); $printString .= "assToDCR(" . $id_subCompany . ");\">" . $name_subCompany . "\n";}
$printString .= qq(assToDCR($id_subCompany);">$name_subCompany\n);
while (my @row = $sth2->fetchrow_array ) { printString .= join(q() , qq(assToDCR($row[0]);">) , encode_entities($row[3]) , "\n");}
&
&
Hmm - other than changing the last line to something a bit more readable (IMO):$printString .= qq(assToDCR($id_subCompany);">$name_subCompany\n);or perhaps changing the entire block to be:while (my @row = $sth2->fetchrow_array ) { printString .= join(q() , qq(assToDCR($row[0]);">) , encode_entities($row[3]) , "\n");}I can't say I see anything wrong with the above - you are encoding the entities so the few entries that have an & in them appear to be coming out correctly with & and the entries appear to be essentially English so it doesn't look like there are any multi-byte or other odd-type characters in the output.You might try adding a debugging line to the while loop (that writes into a tmp file) to see if it always hangs at the same place when run within the CGI - that might help shed light on the source of the problem...
I tried with your code and log entries. If i am not printing the "$printString", then it works and the records all DB values in logs. But when I print that in the HTML part using "print $printString", it hangs. In the log, it hangs on different entries at different tries. If i print only 10 lines, then it works good. It prints all the entries when its a NEW DCR and only one master container, like i mentioned, works when i have few items on the DCR.
...my $printString = q();my $count = 0;my $threshold = 20; # Play with this numberwhile (my @row = $sth2->fetchrow_array ) { $count++; $printString .= join(q() , qq(assToDCR($row[0]);">) , encode_entities($row[3]) , "\n"); if ($count > $threshold) { print $printString; $printString = q(); $count = 0; }}print $printString if ($printString ne q());...