Hello,

in my application, the user puts some info into the textboxes and,after pressing the 
"Insert" button,
the info gets saved in a database as well as in a User Session Object.  Right now, the
text entered into a textbox, actually gets inserted into the database, but it doesn't 
get 
displayed on the next  "Confirmation" screen.  In fact, I get the following message on 
the next screen:

This is an error associated w/ the 'DataObjectExecuteImmediate' method - SQL Error 
(-1605): 23000

Does anybody have any idea on what's going on?  I attached the Java file for the first 
screen, 
and I'm also pasting the code for the both screens.

Thanks in advance for your help.

//[[SPIDER_EVENT<Insert_onWebEvent>
        public int Insert_onWebEvent(CSpWebEvent event)
        {
                int command = PROCEED;
                                
                CSpDBResult             resultSet               = null;
                CSpDBResultStatus       resultStatus    = null;
                
                String businesses = 
getDisplayFieldValue("cbBusinesses").stringValue().trim();
                CSpider.putUserSessionObject("sesBusinesses", (CSpValue) new 
CSpString(businesses));

                String titleQuote = 
getDisplayFieldValue("dfTitleQuote").stringValue().trim();
                CSpider.putUserSessionObject("sesTitleQuote", (CSpValue) new 
CSpString(titleQuote));

                String sourceName = 
getDisplayFieldValue("dfSourceName").stringValue().trim();
                CSpider.putUserSessionObject("sesSourceName", (CSpValue) new 
CSpString(sourceName));

                String articleText = 
getDisplayFieldValue("dfArticleText").stringValue().trim();
                CSpider.putUserSessionObject("sesArticleText", (CSpValue) new 
CSpString(articleText));

                CSpValue date = CSpider.getUserSessionObject("sesDate");
                
                String sql = "INSERT INTO textArticles ";
                
                sql = sql + "VALUES (";
                sql = sql + "'" + date + "'";
                sql = sql + ", '" + businesses + "'";
                sql = sql + ", '" + titleQuote + "'";
                sql = sql + ", '" + sourceName + "'";
                sql = sql + ", '" + articleText + "'";
                sql = sql + ")";

                resultSet = CSpDataObject.executeImmediate("dsDailyNews", sql);
                resultStatus = resultSet.getResultStatus();
                if (resultStatus.getVendorErrorCode1() == resultStatus.SUCCESS)
                {
                        
                        return(PROCEED);
                }
                else
                {
                        CSpCommonPage pgError = CSpider.getCommonPage("pgError");
                        pgError.setDisplayFieldValue("stMessage", new CSpString("This 
is an error associated
         w/ the 'DataObjectExecuteImmediate' method - SQL Error 
("+resultStatus.getVendorErrorCode1()+"):
         "+resultStatus.getVendorErrorMessage1()+".  Please contact the Internet 
Services
         Group for help."));
                        pgError.load(false);
                        return(STOP);
                }
        }
        //]]SPIDER_EVENT<Insert_onWebEvent>

For the Confirmation Page:
//[[SPIDER_EVENT<this_onBeforeDisplayEvent>
        public int this_onBeforeDisplayEvent(CSpDisplayEvent event)
        {
                CSpValue date = CSpider.getUserSessionObject("sesDate");
                setDisplayFieldValue("dfDate", date);
                
                CSpValue var52High = CSpider.getUserSessionObject("ses52High");
                setDisplayFieldValue("df52High", var52High);
                
                CSpValue var52Low = CSpider.getUserSessionObject("ses52Low");
                setDisplayFieldValue("df52Low", var52Low);
                
                CSpValue dataAsOf = CSpider.getUserSessionObject("sesDataAsOf");
                setDisplayFieldValue("dfDataAsOfDate", dataAsOf);
                
                CSpValue high = CSpider.getUserSessionObject("sesHigh");
                setDisplayFieldValue("dfHigh", high);
                
                CSpValue low = CSpider.getUserSessionObject("sesLow");
                setDisplayFieldValue("dfDate", low);
                
                CSpValue last = CSpider.getUserSessionObject("sesLast");
                setDisplayFieldValue("dfLow", last);
                
                CSpValue net = CSpider.getUserSessionObject("sesNet");
                setDisplayFieldValue("dfNet", net);
                
                CSpValue volume = CSpider.getUserSessionObject("sesVolume");
                setDisplayFieldValue("dfVolume", volume);
                
                CSpValue titleQuote = CSpider.getUserSessionObject("sesTitleQuote");
                setDisplayFieldValue("dfTitleQuote", titleQuote);
                
                CSpValue sourceName = CSpider.getUserSessionObject("sesSourceName");
                setDisplayFieldValue("dfSourceName", sourceName);
                
                CSpValue articleText = CSpider.getUserSessionObject("sesArticleText");
                setDisplayFieldValue("dfArticleText", articleText);
                
                CSpValue businesses = CSpider.getUserSessionObject("sesBusinesses");
                setDisplayFieldValue("cbBusinesses", businesses);
                
                return (PROCEED);
        }
        //]]SPIDER_EVENT<this_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]

Reply via email to