When you use substitution functions to modify substitution tables, you must be aware of the fact that StreamServer runs the scripts twice:To execute the substitution functions only once, you can use the PreProc function. The PreProc function returns 1 when the server is in the preprocess phase.
Example 48 /*Check if the server runs in preprocess phase. If it does, perform the substitution.*/if (PreProc() = 1)
{
$nb = AddSubst("../data/tables/author.tbl", "alfred", 1, "100");
}
OpenText StreamServe 5.6 | Updated: 2013-03-01 |