Problem of retrieving data using JComboBox

I built 6 JComboBoxes for retrieving starting day and end day. They are all in the same panel. I could get correct indexes for 6 JComboBoxes, however, I couldn't get the correct object of the month of the end day. Sometimes, I could n't get the correct object of the month of the starting day too. How could I solve this problem?

Here is part of the code:
JComboBox comboToMonth = new JComboBox();
String month[] = { "-", "JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"};
comboToMonth = new JComboBox(month);
comboToMonth.setFont(universe_font);
comboToMonth.setMaximumRowCount(3);
comboToMonth.addActionListener(this);
panel.add("Center", comboToMonth);
public void actionPerformed(ActionEvent e) {
if ( e.getSource() == comboFromYear) {
     int temp = comboFromYear.getSelectedIndex();
}     

Similar Messages

  • Problem in retrieve data  in COSS and COSP from PBS using FM /pbs/select_in

    hi all i have problem in retrieving data from COSP and COSS tables from PBS using FM /pbs/select_into_table in this FM i couldn't find the tables if any body knows pls reply back with the Archiving object to be use and parameters to be used.

    That are controlling tables-
    Have you installed PBS for Controlling ?
    try http://www.pbs-bensheim.de/
    A.

  • Problems with retrieving data from tables with 240 and more records

    Hi,
    I've been connecting to Oracle 11g Server (not sure exact version) using Oracle 10.1.0 Client and O10 Oracle 10g driver. Everything was ok.
    I installed Oracle 11.2.0 Client and I started to have problems with retrieving data from tables.
    First I used the same connection string, driver and so on (O10 Oracle 10g) then I tried ORA Oracle but with no luck. The result is like this:
    I'm able to connect to database. I'm able to retrieve data but from small tables (e.g. with 110 records it works perfectly using both O10 and ORA drivers). When I try to retrieve data from tables with like 240 and more records retrieval simply hangs (nothing happens at all - no error, no timeout). Application seems to hang forever.
    I'm using Powerbuilder to connect to Database (either PB10.5 using O10 driver or PB12 using ORA driver). I used DBTrace, so I see that query hangs on the first FETCH.
    So for the retrievals that hang I have something like:
    (3260008): BIND SELECT OUTPUT BUFFER (DataWindow):(DBI_SELBIND) (0.186 MS / 18978.709 MS)
    (3260008): ,len=160,type=DECIMAL,pbt=4,dbt=0,ct=0,prec=0,scale=0
    (3260008): ,len=160,type=DECIMAL,pbt=4,dbt=0,ct=0,prec=0,scale=1
    (3260008): ,len=160,type=DECIMAL,pbt=4,dbt=0,ct=0,prec=0,scale=0
    (3260008): EXECUTE:(DBI_DW_EXECUTE) (192.982 MS / 19171.691 MS)
    (3260008): FETCH NEXT:(DBI_FETCHNEXT)
    and this is the last line,
    while for retrievals that end, I have FETCH producing time, data in buffer and moving to the next Fetch until all data is retrieved
    On the side note, I have no problems with retrieving data either by SQL Developer or DbVisualizer.
    Problems started when I installed 11.2.0 Client. Even if I want to use 10.0.1 Client, the same problem occurs. So I guess something from 11.2.0 overrides 10.0.1 settings.
    I will appreciate any comments/hints/help.
    Thank you very much.

    pgoel wrote:
    I've been connecting to Oracle 11g Server (not sure exact version) using Oracle 10.1.0 Client and O10 Oracle 10g driver. Everything was ok.Earlier (before installing new stuff) did you ever try retrieving data from big tables (like 240 and more records), if yes, was it working?Yes, with Oracle 10g client (before installing 11g) I was able to retrieve any data, either it was 10k+ records or 100 records. Installing 11g client changed something that even using old 10g client (which I still have installed) fails to work. The same problem occur no matter I'm using 10g or 11g client now. Powerbuilder hangs on retrieving tables with more than like 240 records.
    Thanks.

  • EVDRE error "encountered problem when retrieving data from webserver"

    Hi,
    in a EVDRE we always get the error "encountered problem when retrieving data from webserver"
    When analysing this further we noticed this is always generated when a base member is selected in the CV and the expansion on the row for this dimension is has one of the following expansion settings:
    DEP
    ALL
    NOEXPAND
    if we select SELF, the error disappears again and the EVDRE works fine again ... is this normal behavior?
    there is no problem with application nor dimension.
    D
    solved it

    Note that the keyword "ALL" does not include the member itself. This may cause some confusion, but as Harish implies, when you select a base member it finds no matches if your memberset is "ALL".
    If you want to design a report to handle the user moving back and forth between base and non-base members in their CV, you either need to include SELF,ALL or SELF,DEP, or something similar....
    OR you need to get a little fancier, and use EVPRO to look and see if the CV member is base -- evpro(app,member,"CALC") -- and then use some conditional logic in Excel to choose the correct expansion options. If Calc=N, use Self, otherwise use SELF,DEP or whatever you choose. This can be a bit tricky if you then want the user to be able to drill down in the report (especially if you want the workbook option to insert add'l rows on the expansion, rather than replace), but it's all possible.

  • Is it possible to retrieve data using RFC alone with out using BAPI ?

    Hi ,
    Is it possible to connect SAP to Non-SAP systems to retrieve data using RFC alone with out using BAPI ?
    thanks
    Rama

    Hello Nelson,
    Could you please explain how this can be done. Because my understanding is that only BAPI can be used to connect Non SAP and SAP system not RFC function module.
    Regards
    Farzan

  • How to retrieve data using logical database and custom select options

    Hi all,
    I have a selection screen which is displayed by logical database PSJ and I have two select options of my own. I need to retrieve data based on both selection screen of logical database and my own select options. How can I do it?
    Thanks in advance.

    Hai Gupta
    Check the following Document & Links
    1. A logical database is in fact
    a program only.
    2. This LDB provides two main things :
    a) a pre-defined selection screen
    which handles all user inputs and validations
    b) pre defined set of data
    based upon the user selection.
    3. So we dont have to worry about from
    which tables to fetch data.
    4. Moreover, this LDB Program,
    handles all user-authorisations
    and is efficient in all respects.
    5. tcode is SLDB
    good info about Logical Database. you can check the link.
    http://www.geekinterview.com/question_details/1506
    http://help.sap.com/saphelp_46c/helpdata/EN/35/2cd77bd7705394e10000009b387c12/frameset.htm
    Re: How to Create and Use ldb in reports?
    Re: Logical databases
    http://help.sap.com/saphelp_46c/helpdata/en/9f/db9bed35c111d1829f0000e829fbfe/frameset.htm
    Functions for displaying and changing logical databases:
    Call Transaction SE36 or
    Choose ABAP Workbench -> Development -> Programming environ. -> Logical databases
    Interaction between database program and report:
    During program processing, subroutines are performed in the database program and events are executed in the report.
    To read data from a database tables we use logical database.
    A logical database provides read-only access to a group of related tables to an ABAP/4 program.
    advantages:-
    The programmer need not worry about the primary key for each table.Because Logical database knows how the different tables relate to each other,and can issue the SELECT command with proper where clause to retrieve the data.
    i)An easy-to-use standard user interface.
    ii)check functions which check that user input is complete,correct,and plausible.
    iii)meaningful data selection.
    iv)central authorization checks for database accesses.
    v)good read access performance while retaining the hierarchical data view determined by the application logic.
    disadvantages:-
    i)If you donot specify a logical database in the program attributes,the GET events never occur.
    ii)There is no ENDGET command,so the code block associated with an event ends with the next event
    statement (such as another GET or an END-OF-SELECTION).
    1. transaction code SLDB.
    2.enter name z<ldb-name>
    3.create
    4.short text
    5.create
    6. name of root node (here Ekko)
    7. enter short text (f6)
    8.node type -> data base table.
    9.create
    10 change logical DB
    riht click on ekko and insert node
    here node name ekpo
    11.create
    12. click on selections
    13. press no Should the changed structure of Z<ldb name> be saved first.
    14.select tables which you want to join.
    15.transfer
    16 now you have to o to coding part.
    17. save
    activate.
    19.click to src code
    double click on first include and activate
    Regards
    Sreeni

  • JSF dataTables - Problem during retrieving data from bean

    Hi, Below is the Stack Trace got on displaying data using JSF datatables.
         This error occurs somtimes and is not very frequent.We are using jboss seam, jboss-4.0.5.GA server and Hibernate.
         Anyone knows about this problem and how it can be resolved?
         Thanks in advance
         javax.faces.el.EvaluationException: Cannot get value for expression '#{loc.companyName}'
              at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:402)
              at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:1075)
              at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:508)
              at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:433)
              at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGridRendererBase.java:216)
              at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRendererBase.java:98)
              at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:536)
              at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:495)
              at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:363)
              at org.apache.myfaces.shared_impl.taglib.UIComponentBodyTagBase.doEndTag(UIComponentBodyTagBase.java:54)
              at org.apache.jsp.menu_jsp._jspx_meth_h_panelGrid_0(menu_jsp.java:225)
              at org.apache.jsp.menu_jsp._jspx_meth_f_subview_0(menu_jsp.java:118)
              at org.apache.jsp.menu_jsp._jspService(menu_jsp.java:87)
              at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
              at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
              at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
              at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
              at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
              at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
              at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
              at org.apache.jsp.finish_005fregistration_jsp._jspx_meth_h_form_0(finish_005fregistration_jsp.java:263)
              at org.apache.jsp.finish_005fregistration_jsp._jspx_meth_f_view_0(finish_005fregistration_jsp.java:139)
              at org.apache.jsp.finish_005fregistration_jsp._jspService(finish_005fregistration_jsp.java:93)
              at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
              at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
              at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
              at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
              at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
              at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
              at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
              at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:416)
              at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
              at org.jboss.seam.jsf.SeamViewHandler.renderView(SeamViewHandler.java:59)
              at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at com.kmedia.filter.RequestFilter.doFilter(RequestFilter.java:184)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
              at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
              at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
              at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
              at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
              at java.lang.Thread.run(Thread.java:595)
         Caused by: java.lang.NullPointerException
              at org.jboss.mx.loading.RepositoryClassLoader.findClass(RepositoryClassLoader.java:620)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
              at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:464)
              at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:405)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
              at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
              at org.jboss.seam.jsf.SeamApplication11.getPropertyResolver(SeamApplication11.java:197)
              at org.apache.myfaces.el.ELParserHelper$MyPropertySuffix.evaluate(ELParserHelper.java:532)
              at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145)
              at org.apache.commons.el.BinaryOperatorExpression.evaluate(BinaryOperatorExpression.java:154)
              at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:383)
              ... 70 more
         10:23:55 Servlet.service() for servlet jsp threw exception
         Also check the JSF page, Backing bean, and VO
         JSF page
         <h:dataTable value="#{finishedRegistrationBean.list}" var = "loc" >
                        <h:column>
         <f:facet name="header">
                        <h:outputText value="#{displaymessages.registrationDate}" />
                        </f:facet>
                        <span class="bodylighttext"> <h:outputText value="#{loc.registrDate}" /> </span>
                                                                                                   </h:column>
                        <h:column>
                        <f:facet name="header">
                        <h:outputText value="#{displaymessages.companyName}" />
                        </f:facet>
                        <span class="bodylighttext"> <h:outputText
                        value="#{loc.companyName}" /> </span>
                        </h:column>
                        <h:column>
                        <f:facet name="header">
                             <h:outputText value="#{displaymessages.Address}" />
                             </f:facet>
                        <span class="bodylighttext"> <h:outputText
                        value="#{loc.address}" /> </span>
                        </h:column>
                        <h:column>
                        <f:facet name="header">
                        <h:outputText value="#{displaymessages.Action}" />
                        </f:facet>
                        <h:commandLink target="_blank"
                        action="#{finishedRegistrationBean.viewFinishedRegistrationPage(loc)}">
                        <h:graphicImage value="images/view_icon.gif"
                        alt="#{displaymessages.info_tooltip_view}"
                        width="17" height="17" style="border:0" />
                        </h:commandLink>
                        </h:column>
    </h:dataTable>
    Backing bean
                        @Name("finishedRegistrationBean")
                        public class FinishedRegistrationBean {
                             @In
                             private User user;
                             @In
                             private FacesMessages facesMessages;
                             private List<FinishedRegistrationVO> list;
                             public FinishedRegistrationBean() throws KMException {
                                  filterFinishedRegistration();
                             public void filterFinishedRegistration() throws KMException
                             list = new ArrayList<FinishedRegistrationVO>();
                             finished_list = userDAO.searchFinishedRegistrationDetails(country_code,uniqueID, companyName, user.getUserName());
                             public void setList(List<FinishedRegistrationVO> list) {
                                  this.list = list;
                             public List<FinishedRegistrationVO> getList() {
                             return list;
    FinishedRegistrationVO
         public class FinishedRegistrationVO {
              private String uniqId;
              private String companyName;
              private Date registrDate;
              private String address;
              public String getCompanyName() {
                   return companyName;
              public void setCompanyName(String companyName) {
                   this.companyName = companyName;
              public String getAddress() {
                   return address;
              public void setAddress(String address) {
                   this.address = address;
              public String getUniqId() {
                   return uniqId;
              public void setUniqId(String uniqId) {
                   this.uniqId = uniqId;
              public Date getRegistrDate() {
                   return registrDate;
              public void setRegistrDate(Date registrDate) {
                   this.registrDate = registrDate;
         }

    Could you please post your
    -HBM
    -faces-config.xml

  • Programatically retrieve data using iterator in oracle ADF Mobile

    I want to read programatically data using iterator in ADF mobile. My code is :
    try
    ValueExpression vex = AdfmfJavaUtilities.getValueExpression("#{bindings.WeatherDescriptionIterator}", Object.class);
    AmxIteratorBinding iter = (AmxIteratorBinding)vex.getValue(AdfmfJavaUtilities.getAdfELContext());
    GenericType row = null;
    BasicIterator bIter = iter.getIterator();
    iter.getIterator().first();
    ArrayList employees = new ArrayList();
    for(int i = 0; i < iter.getIterator().getTotalRowCount(); i++)
    row = (GenericType)iter.getCurrentRow();
    String phone = "";
    String email = "";
    if(row.getAttribute("Description") != null)
    phone = row.getAttribute("Description").toString();
    if(row.getAttribute("WeatherID") != null)
    email = row.getAttribute("WeatherID").toString();
    setTempValue(phone + " " + email);
    iter.getIterator().next();
    catch(Exception e1)
    AdfException ex = new AdfException(""+e1.getLocalizedMessage(), AdfException.ERROR );
    throw ex;
    I get error :-> cant not find property bindings
    Edited by: user12190920 on May 7, 2013 5:48 AM

    Hi,
    You can try the below code. Make sure the WeatherDescription should be of type Tree binding
    ValueExpression ve1 =
    AdfmfJavaUtilities.getValueExpression("#{bindings.departments.collectionModel}", AmxCollectionModel.class);
    AmxCollectionModel model = (AmxCollectionModel)ve1.getValue(AdfmfJavaUtilities.getAdfELContext());
    Object[] myArr = model.getKeys();
    for (int x = 0; x < myArr.length; x++) {
    Object myObj = myArr[x];
    Map provider = (Map)model.getProviders().get(myObj);
    String deptName = provider.get("deptName").toString();
    Hope this article may help you - http://deepakcs.blogspot.in/2013/02/adf-mobile-iterate-through-all-rows-in.html
    - Deepak

  • Problem in retrieving email using java mail api

    hi,
    In my project,i am retrieving mails from a particular email id.
    I am able to retrieve the latest mails and save it in a folder in my system.
    The problem is whenever i run the program eventhough the most recently received mail in inbox is retrieved and saved,again it is retrieving the same one and saving it in the same folder(not repeating).
    I tried to check the newmessages in the inbox using the folder.hasNewMessage() method in java mail api,but the method is returning false only regardless new mail is there in inbox or not.
    I want to read the unread messages only.Dont want to retrieve the already read mails.
    I got the mail retrieving code from the below site.(sorry not posting the code because it is so long and having 4 classes)
    http://www.builderau.com.au/program/java/soa/Getting_the_mail_in_receiving_in_JavaMail/0,39024620,39228060,00.htm
    Can anyone tell me how to read unread mails in the inbox?
    Thanks a lot

    hi parvathi
    i think your mail program is receving mails using imap
    the imap is only receve the mail from server but the pop is deleting the mails after receving
    use the following sample code
    package com.sfrc.mail.pop;
    import javax.mail.*;
    import javax.mail.internet.*;
    import com.sun.mail.handlers.message_rfc822;
    import java.util.*;
    import java.io.*;
    * Owner: SFRC IT Solutions Pvt Ltd
    * Author:Arunkumar Subramaniam
    * Date :12-06-2006
    * File Name: AttachRecive.java
    public class AttachRecive
    public static void main(String args[])
    try
    String popServer="192.168.1.1";
    String popUser="pl";
    String popPassword="password";
    // Create empty properties
    Properties props = new Properties();
    // Get session
    Session session = Session.getDefaultInstance(props, null);
    // Get the store
    Store store = session.getStore("pop3");
    store.connect(popServer, popUser, popPassword);
    // Get folder
    Folder folder = store.getFolder("INBOX");
    folder.open(Folder.READ_ONLY);
    // Get directory
    Message message =folder.getMessages();
    Multipart mp = (Multipart)message.getContent();
    for (int i=0, n=mp.getCount(); i<n; i++) {
    Part part = mp.getBodyPart(i);
    String disposition = part.getDisposition();
    // Close connection
    folder.close(false);
    store.close();
    catch (Exception ex)
    System.out.println("Usage: "
    +" popServer popUser popPassword");
    System.exit(0);
    Regards
    Arunkumar Subramaniam
    SFRC IT Solutions Pvt Ltd
    Chennai

  • Problem with retrieving Data

    I am reading the JBDC basic tutorial on Sun website.
    Yesterday, i had problems with connecting the driver and to the database.
    Now many folks on Sun forums help me to figure it out already.
    Now i wanna retrieve the data from the database i have created. But i got error.
    Exception in thread "main" java.sql.SQLSyntaxErrorException: Table/View 'COFFEES' does not exist.
         at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
         at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
         at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
         at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
         at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
         at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
         at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
         at org.apache.derby.impl.jdbc.EmbedStatement.executeQuery(Unknown Source)
         at HelloWorld.main(HelloWorld.java:36)
    Caused by: java.sql.SQLException: Table/View 'COFFEES' does not exist.
         at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
         at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
         ... 9 more
    Caused by: ERROR 42X05: Table/View 'COFFEES' does not exist.
         at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
         at org.apache.derby.impl.sql.compile.FromBaseTable.bindTableDescriptor(Unknown Source)
         at org.apache.derby.impl.sql.compile.FromBaseTable.bindNonVTITables(Unknown Source)
         at org.apache.derby.impl.sql.compile.FromList.bindTables(Unknown Source)
         at org.apache.derby.impl.sql.compile.SelectNode.bindNonVTITables(Unknown Source)
         at org.apache.derby.impl.sql.compile.DMLStatementNode.bindTables(Unknown Source)
         at org.apache.derby.impl.sql.compile.DMLStatementNode.bind(Unknown Source)
         at org.apache.derby.impl.sql.compile.CursorNode.bindStatement(Unknown Source)
         at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
         at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
         at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown Source)
         ... 3 moreI wonder whether we need a reference to the database we have created in our project( I am using eclipse).
    If so, how could we do that ?
    Please help me !!!
    Thanks in advance!!!!

    Here is my code. It's just something following what the tutorial on sun said:
    import java.sql.*;
    import org.apache.derby.client.am.SqlException;
    public class HelloWorld {
         private static Connection con;
          * @param args
          * @throws SQLException
         public static void main(String[] args) throws SQLException, SqlException{
              // TODO Auto-generated method stub
              String url = "jdbc:derby:COFFEEBREAK";
         try{
              Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
              System.out.println("Driver connected...");
         }catch(java.lang.ClassNotFoundException e){
              System.err.print("ClassNotFoundException : ");
              System.err.println(e.getMessage());
         try{
              con = DriverManager.getConnection(url);
              System.out.println("Database connected..");
         }catch(Exception e){
              System.err.print("Connection Error:");
              System.out.println(e.getMessage());
         // Retrieve the data from the database
         Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);
         ResultSet srs = stmt.executeQuery("SELECT * FROM COFFEEBREAK.COFFEES");
         while (srs.next()){
              String name = srs.getString("COF_NAME");
              float price = srs.getFloat("PRICE");
              System.out.println(name+ "               "+ price);
    }PS: you could move this thread to the suitable category. I am sorry for asking through this ...

  • Best practice: Retrieving data using DI server

    Hello experts,
    We are going to build a web shop using DI server. We are not going to use B1WS, because it is not supported and it seems like a lot of people can't get it to work (and so can't we).
    DI Server supports some Data Retrieve Messages, but most of them have a very restricted use. GetItemList for example only returns the item codes and item names. I can't limit the amount of returned values and I can't add columns to the results (if I'm mistaken about this, please tell me so!)
    What are best practices for this?
    Do I use the ExecuteSQL Data Retrieve Message in those cases (like 90-95% of the time) or do I use combinations of Data Retrieve Messages?
    Thanks for your time!
    Vincent

    Hi Vincent,
    What you mentioned are actual problems with current DI API and DI Server. You can't set the amount when using GetItemList both in DI API and DI Server.  The design maybe just consider the common requirements in mid/small size companies. So I think it's better to use ExecuteSQL if you have special requirement.
    Regards,
    MIN Hongjun

  • I am using the database connectivity toolkit to retrieve data using a SQL query. The database has 1 million records, I am retrieving 4000 records from the database and the results are taking too long to get, is there any way of speeding it up?

    I am using the "fetch all" vi to do this, but it is retrieving one record at a time, (if you examine the block diagram) How can i retrieve all records in a faster more efficient manner?

    If this isn't faster than your previous method, then I think you found the wrong example. If you have the Database Connectivity Toolkit installed, then go to the LabVIEW Help menu and select "Find Examples". It defaults to searching for tasks, so open the "Communicating with External Applications" and "Databases" and open the Read All Data. The List Column names just gives the correct header to the resulting table and is a fast operation. That's not what you are supposed to be looking at ... it's the DBTools Select All Data subVI that is the important one. If you open it and look at its diagram, you'll see that it uses a completely different set of ADO methods and properties to retrieve all the data.

  • Problem in reading data using scanner

    In a client - server application,Iam sending the data "~!Raam7krishna~!" continously to the server periodically.... In the server side,Iam using scanner to read the data with the delimiter ~!. Server should continously read the data from the client.so iam using infinite for loop to read the data from the inputstream using scanner..
    Problem is when a client send the data first time,i am received the data correctly in server side... At the second time of transmission of data from client to server,Server should not read any data .... but it does not throw any exception... but my client send the data to the server.... can anyone give me solution......
    Scanner scan=new Scanner(InputStream);
    for(;;)
    {     String data=scan.next
    }

    In a client - server application,Iam sending the data "~!Raam7krishna~!" continously to the server periodically.... In the server side,Iam using scanner to read the data with the delimiter ~!. Server should continously read the data from the client.so iam using infinite for loop to read the data from the inputstream using scanner..
    Problem is when a client send the data first time,i am received the data correctly in server side... At the second time of transmission of data from client to server,Server should not read any data .... but it does not throw any exception... but my client send the data to the server.... can anyone give me solution......
    Scanner scan=new Scanner(InputStream);
    for(;;)
    {     String data=scan.next
    }

  • Problem in exchange data using Bean

    Hi all,
    I have a problem when creating a portal application.
    I've done through the steps described in this link:
    http://www.ajvic.es/irj/portalapps/com.sap.portal.pdk.htmlb.htmlbmanuals/docs/dynpage-01.html
    In this example, I use bean to exchange data.
    In the function <b>doInitialization()</b> in JSPDynpage.java:
    public void doInitialization()
      // create the bean and set a default text value "unknown user
       IPortalComponentRequest request  = (IPortalComponentRequest) this.getRequest();     
       IPortalComponentContext myContext = request.getComponentContext();          
       IPortalComponentProfile myProfile = myContext.getProfile();
       // new bean object  
       UserNameContainer = new DynPageNameBean();
       // set default name
       UserNameContainer.setName("unknown user");
        // store bean in profile for the JSP
        myProfile.putValue("UserNameBean", UserNameContainer);
        // Now we set the state so that we can decide what action to do next
        state = INITIAL_STATE;     
    The code: <b>myProfile.putValue("UserNameBean", UserNameContainer);</b> give a warning: "The methode getValue(String) from the type IPortalComponentProfile is deprecated" and I see that the value of UserNameContainer is <b>not</b> assigned to "UserNameBean".
    If I use this code:
           UserNameContainer = (MyBeanClass) myContext.getValue("MyB");
         UserNameContainer.setName(name);
    The result is the same.
    Do you know how to solve this problem ?
    Thank you in advance & kindly regards.
    Tweety

    Hi
    Here is what you should do.
    First The Bean
    public class UserBean implements Serializable {
    private String name;
    public String getName() {
         return name;
    public void setName(String string) {
         name = string;
    Next the Dynpage DoInitialization Method .
         IPortalComponentRequest request =
                        (IPortalComponentRequest) this.getRequest();
                   UserBean myBean = (UserBean) request.getComponentSession().getValue("myBean");
                   if (myBean == null) {
                        myBean = new UserBean();
                   myBean.setName("Unknown User");
    request.getComponentSession().putValue("myBean",myBean);
    this.state = INITIAL_STATE;
    Next the JSP
    <%@ taglib      uri="tagLib" prefix="hbj" %>
    <jsp:useBean
         id="myBean"
         scope="session"
         class="UserBean"
         />
    <html>
         <hbj:content
              id="myContext">
              <hbj:page
                   title="PageTitle">
                   <hbj:form
                        id="myFormId">
                                                                                              <hbj:textView
                             id="s1" >
                             <%
    s1.setText(myBean.getName());
                             %>
                        </hbj:textView>                    
                   </hbj:form>
              </hbj:page>
         </hbj:content>
    </html>
    Regards
    Rajendra

  • Retrieveing data using RH_READ_INFTY_1001 in ECC 6.0

    Hi Guys,
       I am working on ECC 6.0. I need to fetch data from table HRP1001.
    Hence am using the FM RH_READ_INFTY_1001.
    This FM retrieves all the records but populates the fields SCLAS &
    SOBID with garbage values. These are the main relation fields i need.
    Can anyone suggest how to solve this. Below is the code.
      CALL FUNCTION 'RH_READ_INFTY_1001'
       EXPORTING
          PLVAR                  = C_01
          OTYPE                  = P_OTYPE
          OBJID                  = P_OBJID
          ISTAT                  = '1'
          BEGDA                  = P_BEGDA
          ENDDA                  = P_ENDDA
        TABLES
          I1001                  = P_1001
       EXCEPTIONS
         NOTHING_FOUND          = 1
         WRONG_CONDITION        = 2
         WRONG_PARAMETERS       = 3
         OTHERS                 = 4
      Regards,
       Sandeep.

    hello
    It is waiting for some post processing.
    Please check the
    Note 930816 - Cond. Maint. group not generated after remote client copy.
    971707 , 1176933
    This will help you.
    Thanks
    Amit

Maybe you are looking for