Problem getting correct data from MS Access after doing an Update

Hi all,
I have a problem getting correct data after doing an update. This is the scenario
I am selecting some(Eg: All records where Column X = �7� ) records and update a column with a particular value (SET Column X = �c� ) in all these records by going through a while loop. In the while loop I add these records to a vector too, and pass it as the return value.
After getting this return value I go through a for loop and get each record one by one from the DB and check if my previous update has actually happened. Since No errors were caught while updating DB, I assume all records are updated properly but my record set shows one after another as if it has not been updated. But if I open the DB it is actually updated.
This does not happen to all records, always it shows like this
1st record     Mode = �c�
2nd record     Mode = �7�
3st record     Mode = �c�
4nd record     Mode = �7�
9th record     Mode = �c�
10th record     Mode = �7�
I am relatively new to java and this is someone elses code that I have to modify,So I am not sure if there some thing wrong in the code too
//Here is the method that gets records and call to update and add to vector
public static Vector getCanceledWorkOrders() throws CSDDBException{
//Variable declaration
  try {
    objDBConn = DBHandler.getCSDBCon();
    strSQL  = "SELECT bal bla WHERE [Detailed Mode])=?)";
    objStmt = objDBConn.prepareStatement(strSQL);   
    objStmt.setString(1, '7');
    objWOPRs = objStmt.executeQuery();
    while (objWOPRs.next()) {
     //Add elements to a vector by getting from result set
      //updating each record as PROCESSING_CANCELLED_WO(c)
      iRetVal = WorkOrderDetailingPolicy.updateRecordStatus(objPWODP.iWorkOrderNumber, objPWODP.strPersonInformed, EMSConstants.PROCESSING_CANCELLED_WO);
      if (iRetVal == -1) {
        throw new NewException("Updating failed");
  catch (Exception e) {
    vecWONumbers = null;
    throw new CSDDBException(e.getMessage());
  }finally{
    try {
      objWOPRs.close();
      objStmt.close();
      DBHandler.releaseCSDBCon(objDBConn);
    catch (Exception ex) {}
  //return vector
//here is the code that actually updates the records
public static int updateRecordStatus(int iWONumber, String strPerInformed , String strStatus) throws CSDDBException{
   PreparedStatement objStmt = null;
   Connection objDBConn  = null;
   String strSQL = null;
   int iRetVal = -1;
   try{
     objDBConn  = DBHandler.getCSDBCon();
     objDBConn.setAutoCommit(false);
     strSQL = "UPDATE Table SET [Detailed Mode] = ? WHERE bla bla";
     objStmt = objDBConn.prepareStatement(strSQL);
     objStmt.setString(1, strStatus);    
     objStmt.execute();
     objDBConn.commit();
     iRetVal = 1;
   }catch(Exception e){
     iRetVal = -1;
   }finally{
     try{
       objStmt.close();
       DBHandler.releaseCSDBCon(objDBConn);
     }catch(Exception ex){}
   return iRetVal;
//Here is the code that call the records again
  public static WorkOrderDetailingPolicy getWorkOrders(int iWorkOrderNo) throws CSDDBException{
    Connection objDBConn = null;
    PreparedStatement objStmt = null;
    ResultSet objWOPRs = null;
    WorkOrderDetailingPolicy objPWODP = null;
    String strSQL = null;
    try {
      objDBConn = DBHandler.getCSDBCon();    
      strSQL = "SELECT * FROM [Work Order Detailing] WHERE [Work Order No] = ?";
      objStmt = objDBConn.prepareStatement(strSQL);
      objStmt.setInt(1, iWorkOrderNo);
       objWOPRs = objStmt.executeQuery();
      if (objWOPRs.next()) {
        objPWODP = new WorkOrderDetailingPolicy();
        objPWODP.iWorkOrderNumber = objWOPRs.getInt("Work Order No");
        //......Get Record values
    catch (Exception e) {
      objPWODP = null;
      throw new CSDDBException(e.getMessage());
    }finally{
      try {
        objWOPRs.close();
        objStmt.close();
        DBHandler.releaseCSDBCon(objDBConn);
      catch (Exception ex) {}
    return objPWODP;
  }

Hello,
Can you put an example of your problem online?
Are you sure you're not having problems with case sensitive data?
Thanks,
Dimitri

Similar Messages

  • How to Get Current Date from MS Access in a Select Statement

    From a java method, I want to use JDBC to get the current date from MS Access. In Oracle I would do "select sysdate from dual", but I can't figure out how to do it in MS Access. Here are some of my attempts. I have a table in my Access db called PARM.
    //        String sql = "SELECT '0', NOW() FROM PARM";
    //rs.next() is false
    //        String sql = "SELECT NOW() AS CURR_DT FROM PARM";
    //rs.next() is false
    //        String sql = "SELECT DATE() AS CURR_DT FROM PARM";
    //rs.next() is false
    //        String sql = "SELECT NOW()"; 
    //StringIndexOutOfBoundsException: String index out of range: -1
    //        String sql = "select { fn now() } from parm";
            String sql = "SELECT Date()";
    //java.lang.StringIndexOutOfBoundsException: String index out of range: -1
            ResultSet rs = stmt.executeQuery(sql);
            if (rs.next()) {
                return rs.getString(1);
            } else {
                   return null;
              }

    Why are you getting it as a String? You should be getting it as a timestamp.
    Although getString works for me too. There is something else wrong that you haven't shown.
    Here is some shoddy, but simple, test code that demonstrates it working.
    import java.sql.*;
    public class Test{
      public static void main(String args[])throws Exception{
        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
        Connection c = DriverManager.getConnection("jdbc:odbc:stats");
        Statement s = c.createStatement();
        ResultSet rs = s.executeQuery("SELECT NOW()");
        while(rs.next()){
          System.out.println(rs.getTimestamp(1));     
        rs.close();
        s.close();
        c.close();
    }

  • How do I get my data from Sync account after I reformat my computers without backup favourites?

    Hello,
    I formatted my computer without backup all of my favourites in Firefox. I have Firefox sync account set up before that between the 2 computers but both of them have formatted. Now, how do I get the data out from my Sync account? Did Firefox save my data on their server and how can I check that?
    Thanks,

    Also:
    *If you have regenerated your Sync key or reset your Sync password, you can not recover your previous data
    *IMPORTANT - write down your Sync key as instructed in the original set up of Sync
    *if you have another device (computer or mobile) paired to the computer where you are having a problem, you can either:
    *#pair the problem computer to that other device
    *#get the Sync key from that other device
    '''<u>Remember</u>''', Sync was never intended for backup. The reason for its existence is to sync-up 2 devices. To back up your Firefox profile, which you should do frequently, to another drive or a pin/thumb drive or other backup media, see:
    *https://support.mozilla.org/en-US/kb/back-and-restore-information-firefox-profiles
    *http://kb.mozillazine.org/Profile_backup
    *https://support.mozilla.org/en-US/kb/Recovering%20important%20data%20from%20an%20old%20profile
    *http://kb.mozillazine.org/Recovering_a_missing_profile

  • Data type structure while picking data from MS Access database

    Dear All,
    I have to start on new interface in which data from MS Access database will be updated in the z-table in SAP. Is there any blog available which gives step by step process for MS Access-XI-RFC interface. Or please guide me on what should be the structure of the Data Type for picking the data from the MS Access database.
    Regards,
    NJ

    Hi Nishu,
    Sender side the structure is as follows
    db_sen_dt
    ..... emp_row
    ..........  f1
    ..........  f2
    Structure is complex then check this blog
    /people/alessandro.berta/blog/2005/10/04/save-time-with-generalized-jdbc-datatypes
    JDBC to RFC Scenario, but it is synchronous
    SYNCHRONOUS SOAP TO JDBC - END TO END WALKTHROUGH  
    Also check this link
    Regards
    Ramesh

  • Fetching all data from MS access PROBLEM !!!

    Hi all,
    I am having problem of fetching all data from MS ACCESS, ie, I have 112 rows of data, yet when executing query SELECT * ... only 70 items are retrieved. Don't know why, but the retrieval prcess stops on item 69 and want get the rest of the data.
    I am executing the query in a WHILE loop, don't specify the number of loops !!! so I should be able to get all of the data. Why then I always only get 69?
    Second q.
    What is the right SYNTAX for retrieving specific data. ie. SELECT id from images WHERE size = 58
    is this correct? ie. size is declared as number?
    ANy help would be much appreciated.
    Thanks

    1. Where from you are fetching the data? Is it from bean or JSP or servlet? Can you post the code?
    2. Yes. the sql syntax is correct.

  • I recently restored my iPhone 4s from back-up after being reset. An app that I had turned off in back-up did not show up in my recent resoration. I forgot to turn that app back on. Would there be any way I would be able to get the data from that app?

    I recently restored my iPhone 4s from back-up after being reset. An app that I had turned off in back-up did not show up in my recent resoration. I forgot to turn the app back on. Would there be any way I would be able to get the data from that app onto my phone? Is it possible to put an old back-up on my phone?

    LukaPetranovic wrote:
    Hello anita4323.
    I hope this will help you with your problem:
    Back up and restore your iPhone, iPad, or iPod touch using iCloud or iTunes - Apple Support
    You can restore your backup whenever you want from iTunes or iCloud, depending where you made it.
    Let us know if you succeeded or need any further help.
    I believe you are missing the point. The OP has already restored from back up, but failed to include a specific app in the back up and is trying to recover data for it, which in this case is not possible.

  • Getting arabic data from Access

    Originally i'm importing data from a word table containing arabic data to oracle database
    i thougt about copying the dat ato excel then importing them to access
    i did that successfully
    now i want to generate insert statements dynamiclly touse them within oracle i did that but the problem when reading the columns containing arabic data from access i get exclaimation marks
    i tried priniting the data to the console or writing them to a file the arabic data didn't apear i tried creating new strings using arabic character encoding cp1256 win-1256 and isoxzxzx it didn't work
    anyone have suggestions?

    hi, did u solve the problem please tell me if u did, im having the same problem.im trying to get arabic words from MS Access database and send them over a network
    Shuqman

  • The problem here is i am not able to get the data from the list

    hi all,
    i have the following code
    EnrichedProductCatalogue enrichedProductCatalogue1 = new EnrichedProductCatalogue();
    enrichedProductCatalogue1.setAssetCount(2);
    enrichedProductCatalogue1.setBlockingProduct("Weekend Freebee");
    enrichedProductCatalogue1.setBlockingReason("Compatability");
    ArrayList<String> availableActionsList = new ArrayList<String>();
    availableActionsList.add(EnrichedProductConstants.ADD.toString());
    availableActionsList.add(EnrichedProductConstants.REMOVE.toString());
    enrichedProductCatalogue1.setAvailaibleActions((ArrayList<String>)availableActionsList);
    BundleProduct bundleProduct = null;
    Product product = new Product();
    product = new Product();
    product.setProductName("International");
    product.setProductClassName("International");
    ArrayList<UiCategory> uiCategory = new ArrayList<UiCategory>();
    UiCategory uiCategory1 = new UiCategory();
    uiCategory1.setCategoryName("Simply");
    UiCategory uiCategory2 = new UiCategory();
    uiCategory2.setCategoryName("Freebees");
    uiCategory.add(uiCategory1);
    uiCategory.add(uiCategory2);
    product.setUiCategory(uiCategory);
    bundleProduct = new BundleProduct();
    bundleProduct.setCommercialProduct(product);
    enrichedProductCatalogue1.setBundleProduct(bundleProduct);
    listOfEnrichProducts.add(enrichedProductCatalogue1);
    listOfEnrichProducts.add(enrichedProductCatalogue1);
    here i have an list called listOfEnrichProducts.
    here i am adding two objects of enrichedProductCatalogue.
    which contains a object called BundleProduct.
    which has a reference for Product class.
    here this product class has a list which contains objects of another class called UiCategory.
    the problem here is i am not able to get the data from the list which contains UiCategory objects .
    the following is the UI
    <af:table var="row" rowBandingInterval="0" id="t1"
    value="#{pageFlowScope.sample1}"
    binding="#{pageFlowScope.sampleManagedBean.dataTable}"
    partialTriggers="apimethods ::apimethods">
    <af:column sortable="false" headerText="ProductName" id="c2">
    <af:outputText value="#{row.bundleProduct.commercialProduct.productName}" id="ot15"/>
    </af:column>
    <af:column sortable="false" headerText="ProductClass" id="c12">
    <af:outputText value="#{row.bundleProduct.commercialProduct.productClassName}" id="ot19"/>
    </af:column>
    <!--
    <af:column sortable="false" headerText="UICategoryName" id="c32">
    <af:forEach var="item" items="#{row.bundleProduct.commercialProduct.uiCategory}" >
    <af:outputText value="#{item.categoryName}" id="ot119"/>
    </af:forEach>
    </af:column>
    -->
    <af:column sortable="false" headerText="AssetCount" id="c22">
    <af:outputText value="#{row.assetCount}" id="ot1"/>
    </af:column>
    <af:column sortable="false" headerText="blockingReason" id="c3">
    <af:outputText value="#{row.blockingReason}" id="ot2"/>
    </af:column>
    <af:column sortable="false" headerText="blockingProduct" id="c4">
    <af:outputText value="#{row.blockingProduct}" id="ot3"/>
    </af:column>
    <!--<af:column sortable="false" headerText="availaibleActions" id="c1">
    <af:commandButton text="#{row.availaibleActions}" id="cb1"
    actionListener="#{pageFlowScope.sampleManagedBean.callAction}"
    partialSubmit="true">
    <af:setPropertyListener from="#{row.availaibleActions}"
    to="#{pageFlowScope.avalibleaction}" type="action"/>
    </af:commandButton>
    </af:column>-->
    </af:table>
    Can anyone pls give some solution ...

    Hi Frank,
    value="#{pageFlowScope.sample1}"
    here sample is
    Map<String, Object> flowScope1 =
    ADFContext.getCurrent().getPageFlowScope();
    flowScope.put("sample1", listOfEnrichProducts);
    this is not the problem . i am able to get all the values except the following .
    ArrayList<UiCategory> uiCategory = new ArrayList<UiCategory>();
    UiCategory uiCategory1 = new UiCategory();
    uiCategory1.setCategoryName("Simply");
    UiCategory uiCategory2 = new UiCategory();
    uiCategory2.setCategoryName("Freebees");
    uiCategory.add(uiCategory1);
    uiCategory.add(uiCategory2);
    product.setUiCategory(uiCategory);

  • How to get the data from mysql database which is being accessed by a PHP application and process the data locally in adobe air application and finally commit the changes back in to mysql database through the PHP application.

    How to get the data from mysql database which is being accessed by a PHP application and process the data locally in adobe air application and finally commit the changes back in to mysql database through the PHP application.

    If the data is on a remote server (for example, PHP running on a web server, talking to a MySQL server) then you do this in an AIR application the same way you would do it with any Flex application (or ajax application, if you're building your AIR app in HTML/JS).
    That's a broad answer, but in fact there are lots of ways to communicate between Flex and PHP. The most common and best in most cases is to use AMFPHP (http://amfphp.org/) or the new ZEND AMF support in the Zend Framework.
    This page is a good starting point for learning about Flex and PHP communication:
    http://www.adobe.com/devnet/flex/flex_php.html
    Also, in Flash Builder 4 they've added a lot of remote-data-connection functionality, including a lot that's designed for PHP. Take a look at the Flash Builder 4 public beta for more on that: http://labs.adobe.com/technologies/flashbuilder4/

  • Anyone knows about using java to get data from MS Access database.

    hi there
    anyone knows about using java to get data from MS Access database? thank you

    there is a list of jdbc drivers at:
    http://industry.java.sun.com/products/jdbc/drivers
    they have several ms access drivers listed.
    also, you can use a jdbc-odbc bridge which allows you to use jdbc to connect to any odbc data source:
    http://java.sun.com/j2se/1.3/docs/guide/jdbc/getstart/bridge.doc.html

  • URGENT! Getting the correct data from field BET01 in Infotype 0008

    Hello,
    I am trying to read the logs (Long-term PCL4) for the field BET01, BET02...in infotype 8. When I get the data from the logs, the value that appears in BET01 seems to be different from the value present in PA0008.
    Does this value depend on the wage types valuation? How is this value in the logs calculated? For the same amount present in pa0008-bet01 and for same wage type, i am seeing a different amount coming up from logs. Could anyone please help me with this to understand how the value in logs is being calculated?
    Thank you very much !

    If two users run the same select at the same time, they will ALWAYS come up with a duplicate doc code.
    The standard way to insure a unique code is to use an Oracle sequence.
    Otherwise, you could build your pl/sql into a stored procedure or package that inserts the new document code into the table before it passes it back to the user. This would prevent the second user from getting a duplicate, but would also stop user 2 from even getting a document code until user 1 did a commit.

  • How to get data from MS Access?

    How can select data from MS Access datafile, stored on some computer in local network? How to connect Oracle database to MS Access datafile? I tried use ODBC, but unsuccefull. Any idea? Some link to some guide?

    mihaelradovan wrote:
    How can select data from MS Access datafile, stored on some computer in local network? How to connect Oracle database to MS Access datafile? I tried use ODBC, but unsuccefull. Any idea? Some link to some guide?How were you "unsuccessful"?
    You set up an ODBC connection to the MS Access file, then use Oracle Heterogeneous services and configure those to point to the ODBC connection and use that.
    Here's an example I already have for an MS Excel file...
    1- Go to Control Panel>Administrative Tools>Data Sources (ODBC)>System DSN and create a data source with appropriate driver. Name it EXCL.
    2- In %ORACLE_HOME%\Network\Admin\Tnsnames.ora fie add entry:
    EXCL =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.12.0.24)(PORT = 1521))
    (CONNECT_DATA =
    (SID = EXCL)
    (HS = OK)
    Here SID is the name of data source that you have just created.
    3- In %ORACLE_HOME%\Network\Admin\Listener.ora file add:
    (SID_DESC =
    (PROGRAM = hsodbc)
    (SID_NAME = <hs_sid>)
    (ORACLE_HOME = <oracle home>)
    under SID_LIST_LISTENER like:
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = d:\ORA9DB)
    (PROGRAM = extproc)
    (SID_DESC =
    (GLOBAL_DBNAME = ORA9DB)
    (ORACLE_HOME = d:\ORA9DB)
    (SID_NAME = ORA9DB)
    (SID_DESC =
    (PROGRAM = hsodbc)
    (SID_NAME = EXCL)
    (ORACLE_HOME = D:\ora9db)
    Dont forget to reload the listener
    c:\> lsnrctl reload
    4- In %ORACLE_HOME%\hs\admin create init<HS_SID>.ora. For our sid EXCL we create file initexcl.ora.
    In this file set following two parameters:
    HS_FDS_CONNECT_INFO = excl
    HS_FDS_TRACE_LEVEL = 0
    5- Now connect to Oracle database and create database link with following command:
    SQL> CREATE DATABASE LINK excl
    2 USING 'excl'
    3 /
    Database link created.
    Now you can perform query against this database like you would for any remote database.
    SQL> SELECT table_name FROM all_tables@excl;
    TABLE_NAME
    DEPT
    EMPOr refer to this Article...
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:4406709207206

  • Get the Data from a DataSource

    Hi,
    I start with JMF. I use a processor to get DataSource from an audio file. Until there, all runs very well.
    But after that, I would like to get the raw data of my DataSource to aplly a filter on these data and after that, to create a new DataSource with filters data and play these data with my processor.
    I searched in the API documentation of JMF but I did'nt find the solution to get the raw data of my DataSource !
    Someone could help me ? and give me an idea of how to proceed ?
    Thanks for yours answers.
    Sylvain.

    Hi,
    It seems no one has replied to this post. I have a sample code that can help getting raw data from a DataSource. Here it is:
              PushBufferDataSource source = null;
              source = (PushBufferDataSource)processor.getDataOutput();
              /* Now we can retrieve the PushBufferStreams that will enable us to
              * access the data from the camera
              PushBufferStream[] streams = source.getStreams();
              camStream = null;
              for (int i = 0; i < streams.length; i++) {
              /* Use the first Stream that is RGBFormat (there should be only one */
              if (streams.getFormat() instanceof RGBFormat) {
                   camStream = streams[i];
                   RGBFormat rgbf = (RGBFormat)streams[i].getFormat();
                   converter = new BufferToImage(rgbf);
                   break;
    Please let me know whether it helped solving your problem..
    Suresh

  • Retrieve data from MS Access database.

    Hi all,
    The following is part of my coding. Once I have clicked the jButton1, the jTextField1 will get the input of user and store into a variable named "bbb". After that the variable will be passed to a function as a parameter to retrieve data from MS Access database using the ResultSet method. Next, the ResultSet will be splited into many part and just the student ic will be displayed.
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                        
    // TODO add your handling code here:
            String bbb = jTextField1.getText(); //get input from user and store into a variable named bbb
            ResultSet codes = getCodes(bbb); //Retrieve data from database
            Code c = getCode (codes); //split the retireved date to many part
             jLabel2.setText(c.ic);  //display the student ic only
       private static ResultSet getCodes(String bbb)
            Connection con = getConnection();
            try
            Statement s = con.createStatement();
            String select = "SELECT [Student-File].* " + "FROM [Student-File] WHERE (([Student-File].[student-code])=bbb); " ;
            ResultSet rows;
            rows = s.executeQuery(select);
            return rows;
            catch (SQLException e)
                System.out.println(e.getMessage());
            return null;
    private static Code getCode (ResultSet codes)
            try
                String name = codes.getString("student-name");
                String scode = codes.getString("student-code");
                String ic = codes.getString ("student-ic");
                String add = codes.getString ("student-address");
                String phone = codes.getString ("student-phone");
              return new Code (name,scode,ic,add,phone);
            catch (SQLException e)
                System.out.println(e.getMessage());
            return null;
        private static class Code
            public String name ;
            public String scode ;
            public String ic ;
            public String add;
            public String phone;
            public Code (String name, String scode, String ic,String add,String phone)
                this.name = name;
                this.scode = scode;
                this.ic = ic;
                this.add = add;
                this.phone = phone;
    }But after I have compiled the coding above, the following error existed.
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
    at testing3.getCode(testing3.java:137)
    [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
    at testing3.jButton1ActionPerformed(testing3.java:71)
    at testing3.access$000(testing3.java:17)
    at testing3$1.actionPerformed(testing3.java:45)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
    at java.awt.Component.processMouseEvent(Component.java:5488)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
    at java.awt.Component.processEvent(Component.java:5253)
    at java.awt.Container.processEvent(Container.java:1966)
    at java.awt.Component.dispatchEventImpl(Component.java:3955)
    at java.awt.Container.dispatchEventImpl(Container.java:2024)
    at java.awt.Component.dispatchEvent(Component.java:3803)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
    at java.awt.Container.dispatchEventImpl(Container.java:2010)
    at java.awt.Window.dispatchEventImpl(Window.java:1774)
    at java.awt.Component.dispatchEvent(Component.java:3803)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at testing3.getCode(testing3.java:137)
    at testing3.jButton1ActionPerformed(testing3.java:71)
    at testing3.access$000(testing3.java:17)
    at testing3$1.actionPerformed(testing3.java:45)
    My questions here are:
    1) Will my idea above work?
    2) Is it correct of my query statement that send to MS Access database?
    Can anyone help me?
    Thanks in advance,
    ning.

    you may try this:
    String select = "SELECT * FROM your_table_name WHERE your_column_name = '" + bbb + "'";or another approach using PreparedStatement:
    String select = "SELECT * FROM your_table_name WHERE your_column_name = ?";
    PreparedStatement ps = con.prepareStatement(select);
    ps.setString(1, "bbb");
    ResultSet rs = ps.executeQuery();hth.

  • Problem in passing data from 1 screen to another using BBP_DOC_CHANGE_BADI.

    Hi Experts,
    i am new to the SRM, i am facing problem in passing data from one screen to another.
    my requirement is that when we select one shopping cart and press the PROPOSE SOURCES OF SUPPLY button, we will fetch all the contracts that are attached to the shopping cart.
    we have implemented a BADI implementation of BBP_SOS_BADI (method BBP_SOS_CHECK) for passing some changed values to the contracts of the shopping cart into the popup screen that is displayed when we press PROPOSE SOURCES OF SUPPLY button and when we select any contract and press ASSIGN ONLY button in the popup screen the badi BBP_DOC_CHANGE_BADI is triggered.
    i have implemented another BADI implementation of BBP_DOC_CHANGE_BADI for fetching the selected contract and pass the values to another screen, but the problem is that when we select one contract and press the assign only button we are fetching the wrong contract number ( that is in the BADI method BB_SC_CHANGE parameter IT_ITEM we are fetching the wrong contract), if we again do the same procedure for the second time we are getting the correct contract.
    i am unable to understand why we are getting the wrong contract in the first time( that is we are getting contract other than the selected one).
    as per my understanding i think when we are passing data to the popup screen using BBP_DOC_CHANGE_BADI we are not updating the shopping cart with the changed data.
    can anyone tell me how we can update the SHOPPING CART with the changed contracts data, i have used BBP_PD_SC_UPDATE, BBP_PD_SC_SAVE and other shopping cart FM but nothing is happening.
    Thanks
    Tanveer

    Hello,
    What version of SRM are you on?  Have you check for OSS Notes?  I have had trouble with BBP_DOC_CHANGE_BADI but it was because of other issues.  The BADI works pretty well and it is called almost every time something happens to the shopping cart.
    I have noticed that sometimes that values are not changed til the second calling of the BADI.  I have yet understand why but I think it has to do with prompt processing. Usually, we train our requisitioners to click the 'Check'  button to flush things out.
    I don't know if I was helpful.... another thought.... could there be an error caught by BBP_DOC_CHECK_BADI that is preventing change in BBP_DOC_CHANGE_BADI?
    Regards, Dean.

Maybe you are looking for

  • Where can I find a lint free cloth to clean my MacBook screen?

    Hello I have a MacBook and I know it is suppose to come with a lint free cloth to clean the screen, but when I brought my laptop there was not one in the box. I called Applecare and they said I can by a lint free cloth, I was just wondering what stor

  • Photo description box

    How do I make the photo description box larger, more than 2 line long. Without hovering the curser over the description box.

  • Clear white space under layer divs

    Is there a way to clear the white space under layer divs?  See below.  There are three layers, and then another div tag below that that has "Text".  The red area is pointing to the white space I need to get rid of. Here is the code: <html> <head> <st

  • Keeping edited versions separate from master files

    I keep my RAW masters (digital neg if you will) on a separate 2TB drive. I run my images from a referenced library and i store my libraries on a separate HDD. However, every time i use a plug-in or create a PDS file, it stores that new PSD right alon

  • J1INUT Error - No data exist for processing with the given selection option

    Hi Guru's, I am using transaction J1INUT utilization of provision of TDS on Services for which in have made the provision with the help of J1INPR, But when I am executing J1INUT transaction .The following error message is displaying: No data exist fo