Hi,
We have inherited an application that has the following code in a page
which most other pages extend from. Each child page calls
super.onBeforeDisplayEvent to execute the code below.
The application we have is multi-lingual and runs in many different
countries. I believe there was some problem originally with character
conversions between the database (we use SYBASE adaptive server
11.0.3) and NetDynamics.
The solution below, while it works, doesn't appear to be an optimal
solution given the fact that everytime a page is loaded a database
call is executed.
What I'm trying to find out is:
1. Has anybody else experienced this?
2. Most importantly, has anybody discovered a better solution?
3. How does ND handle locales and character sets?
Regards,
Damian O'Connor
P.s. We use ND version 4.1.3.8
//[[SPIDER_EVENT<onBeforeDisplayEvent ()>
protected int onBeforeDisplayEvent ()
{
int command = PROCEED_WITH_BUILTIN_HANDLING;
// Get the language code
CSpValue languageCode = getUserLanguage( );
CSpDataObject.executeImmediate("TheDB",
"set char_convert iso_1");
// Set the users environment
CSpider.setCurrLocale( new CSpLocale(
languageCode.stringValue() ) );
// Load up all the page values into our hash table
if ( !queryFieldTranslation( ) )
{
// Database access fail
((pgStart)CSpider.getPage( "pgStart" )).load( true );
command = STOP_PROCESSING;
}
return command;
}
//]]SPIDER_EVENT<onBeforeDisplayEvent ()>
_________________________________________________________________________
For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
For dire need help, email: [EMAIL PROTECTED]