Hi
I have the following code in the onBeforeDisplayEvent for the page.
I am concerned with the code in the try catch.  It is not firing...
Why??
Any advice?


//[[SPIDER_EVENT<this_onBeforeDisplayEvent>
        public int this_onBeforeDisplayEvent(CSpDisplayEvent event)
        {
                
                CSpUserProfile myUserProfile = CSpider.getUserProfile();

                // save username/password from page into session objects
(used by Security Object for password validation )
                CSpValue myUserID = CSpider.getUserSessionObject (
SO_USER_ID ) ;
                CSpValue myPassword     = CSpider.getUserSessionObject (
SO_USER_PASSWORD ) ;
                CSpider.setUserProfile( myUserProfile );
                // de-activate the user profile to ensure that a new profile
is constructed
                myUserProfile.setSecurityObjectActivated( false );
                int myResult =  CSpider.getProject ().getSecurityObject
().doLookup ( myUserProfile ) ;  
                //CSpider.broadcastAdminMessage("CLOSE_CONNECTION");
                // Insert Subscriber Id and Login Msg into Subscriber Usage
Table
                try
                        {
                                String sSubscriberId = myUserID.toString();
                                String sActionTaken = "Logged Out";
                                String sOtherInfo = "  ";
                                
                                CSpDBResult sInsert =
CSpDataObject.executeImmediate("dsLionUser","INSERT INTO SubscriberUsage
VALUES ('" + sSubscriberId + "' ,'" + sActionTaken + "',getdate(), '" +
sOtherInfo + "')");
                                int errorCode = sInsert.getResultStatus
().getErrorCode ();
                                if ((errorCode == CSpDataObject.SUCCESS) ||
(errorCode == CSpDataObject.END_OF_FETCH))
                                {       
                                        
                                }
                                else
                                {
                                        callErrorPage( "Insert into
Subscriber Usage Failed.  Please contact [EMAIL PROTECTED] ");

                                        return (STOP_PROCESSING);
                                }
                        }
                        catch (Exception ex)
                        {
                                callErrorPage( "There was an error
validating data for insert into subscriber usage table");
                                return (STOP_PROCESSING);
                        }       

                
                
                return (PROCEED);
        }
        //]]SPIDER_EVENT<this_onBeforeDisplayEvent>
Isabel Kaluza
Junior Systems Planning Analyst
Saskatchewan Liquor and Gaming Authority
<mailto:[EMAIL PROTECTED]>



_________________________________________________________________________

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]

Reply via email to