Changes to the table is not reflected in the Java application

Hi all!
I'm under Oracle Developer J 11 g.
I'm quite new to using Java .sql command execution and so feel my way around.
I used SQL Worksheet the IDE and create tables in a database.
I also used this SQL worksheet to fill tables and checked the content as well.
Then using Java, I wrote a code to issue a Select statement in a table to store the contents of the query in
Some Arraylists... etc etc...
In any case, I then ran the program and everything seems to work properly.
So I ran a sql script to insert several rows in the table.
When I do a select sql query * command, my new lines are there.
Then I run the Java program and the new lines don't seem to be there?
Now, I'm stumped. Am I missing something here?
Please can someone enlighten me?
Any help would be welcome.

Hello

conn.setAutoCommit();

Sound used when you want to work in a transaction. If a connection is in auto-commit mode, then all the sql stmts will be executed and committed as individual tranasction. Some other sql stmts are grouped in a transaction that must be engaged by a method or a cancellation.
So, once your transaction is complete, replace the State of autocommit to true.

or

try {
// Connect to Oracle using JDBC driver
System.out.print("*** -> Connecting to -> " + connectionURL + "\n");
conn = DriverManager.getConnection(connectionURL,"SYSTEM","PASSWORD");
System.out.print("*** -> Connected as URL -> " + connectionURL + "\n");

// TURN OFF AutoCommit
//System.out.print("*** -> Turning Off AutoCommit...\n");
conn.setAutoCommit(false);
stmt = conn.createStatement (ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);

System.out.print("*** -> Opening ResultsSet...\n");
results = stmt.executeQuery (sql);

conn.commit();

} catch(SQLException sqel) {
conn.rollback();
}

Twinkle

Tags: Database

Similar Questions

  • How to debug the java application BlackBerry on Eclipse with a BlackBerry Smartphone?

    Problem:

    How to debug the java application BlackBerry on Eclipse with a BlackBerry Smartphone?

    The following procedure:

    http://docs.BlackBerry.com/en/developers/deliverables/12002/Debug_an_app_on_BB_device_656366_11.jsp

    Error:

    An internal error occurred during: "launch WMMS_ACC_video_test0".
    java.lang.NullPointerException

    I found that other methods of debugging.

    If anyone knows how to do it please tell me.

    Thank you for your attention.

    http://www.BlackBerryForums.com/developer-forum/107455-debugging-live-device.html

    Solution:

    Start the IDE
    Connect your device to the PC via USB
    compile your application and load on the device
    in JDE - Debug - attach to-Pocket
    ignore all dialog boxes
    do the breakpoint
    Start your application on the device

  • Webworks app - same keys as signature by signing the java application?

    Hi people.

    I develop java applications and I joined them successfully.

    Now, I tried to use webworks so I installed the sdk and the ripple. Application works well in the Simulator, but I want to deploy to the device, so I need sign app. My question is: is webwork using the same keys for the signature of the app which are used in a java application? Or I need new keys for webwork?

    If it is the same. How to sign app if key for java applications has been installed before webworks?

    Thanks for the replies

    Thank you

    Acctually what I registered with same. New did not work properly. He has not signed any files

  • How to integrate the Java Application with OSB

    Hi, I'm a new guy with OSB and we plan to integrate the project with OSB, the exchange of existing project data type is REST JMS and NIO(Apache MINA).

    Could you any body show me how to configure the JMS/REST/NIO in OSB, and how java application call the proxy service maybe OSB?

    For example, the producer will push the message in the jms queue and s Comsumer will pull the message from the queue, java application is sufficient to bind the JDNI queue to identify the queue. But if set up in OSB, how java application to trigger the OSB proxy service to push the message in the jms queue and also how to consume?

    Thank you.

    It is certainly not necessary, because the current solution works for you.

    There may be some advantages however. OSB allows, for example, to disconnect the Server publication and the queue in the sense of identification information. OSB only could credentials to the actual queue, and the editor know only the creds to its own queue of the entry. Or to implement more complex logic that updates the latest version of the consumer - made demand to separate release dates for the producer and the consumer, who, in case of different vendors is a HUGE pain.

    OSB is the proverbial extra level of indirection that allows to solve any problem in IT. If you do not have a problem still though that obviously is not necessary a solution.

    Vlad

    http://genericparallel.com

  • Listen for main events outside the java application

    I'm automating a procedure with the class Robot, sending mouse clicks and keys all around the BONE. I wish I could stop this procedure with a combination of keys, but the active window may not something to do with java at that time.

    Is there a way for my java application to listen a touch in this way?

    sabre150 wrote:

    Smigh wrote:
    Is there a way for my java application to listen a touch in this way?

    I would be very uncomfortable if it were possible without some big restrictions because it would allow a rogue program record passwords entered in other programs.

    Although keyloggers are available on any platform.

    The reason why you will not do using Java is because it is cross-platform and isolates your applications from the OS, rather than provide a pleasant environment and comfortable sandbox; to system events is exactly the opposite of isolation. Use a native language of the OS to be able to have the opportunity to do such things (and even then it will probably not possible without jumping through hoops first).

  • How Profilling memory in the java application BB usage?

    Hi all

    I want to know is it possible to profile memory usage of an application (process) in the java program of The BB. I want to check that the memory of the uses of my app in my code.

    Can someone help me?

    Thanks for your help.

    The JDE has a high profile tools that I'm sure will do what you need to do.  You will find that he documented in the JDE, in the BlackBerry Java Applications debugging.  The general process (or at least, how I usually use) is to set a breakpoint at the beginning and at the end of the code I want to analyze.  When I hit the breakpoint in the beginning, I reset the stats, let it go all the way and then to spot the differences!

  • Access to the Java applications to a camera on BlackBerry

    A java application developed by we would need to interact with the camera of BlackBerry devices. I would appreciate to know if this is possible and if so, with the terminals and the versions of the operating system it would work.

    Thanks in advance.

    Adolfo Martinez

    [email protected]

    V4.6 and higher you can use the JSR-135 to incorporate the field of the camera in your application using the VideoControl and take pictures using VideoControl.getSnapshot.

    For earlier versions, you can call the camera to create a user and then take the photo that you can detect by auditors to review of file system.  There is an example on how to achieve this in the JDE 4.3 and higher.

  • Change on the fly application background image

    My main application screen has a background image, set (it is abbreviated):

    Class BBScreen extends screen implements {FieldChangeListener}

    public BBScreen()

    {

    Super (Manager.NO_VERTICAL_SCROLL);

    setTitle ("my app");

    BM1 = Bitmap.getBitmapResource (...);

    vfm0 = new VerticalFieldManager (...) {

    public void paint (Graphics graphics)

    {

    graphics.drawBitmap (..., bm1,...);

    Super.paint (graphics);

    }

    };

    Add (vfm0);

    }

    }

    However at some point during execution, I want the background image of the bm1 to bm2.  How to set the new picture and that the painting occurs?  Thanks for the pointers.  FD

    Try something like this:

    public class BBScreen extends MainScreen implements FieldChangeListener{    Bitmap bm1 = Bitmap.getBitmapResource("image1.png");    Bitmap bm2 = Bitmap.getBitmapResource("image2.png");    Bitmap mainBitmap;    public TestScreen()     {        super(Manager.NO_VERTICAL_SCROLL);        setTitle( "My Title");           mainBitmap = bm1;        VerticalFieldManager vfm0 = new VerticalFieldManager(...)        {            public void paint(Graphics graphics)            {                graphics.drawBitmap(.., mainBitmap, ...);                super.paint(graphics);            }         };        ButtonField btn = new ButtonField("Change Background");        btn.setChangeListener(this);        vfm0.add(btn);        add(vfm0);        }    public void fieldChanged(Field field, int context)     {        mainBitmap = bm2;       this.invalidate();   }}
    

    Concerning

    Bika

  • When and how do to restart the device after the installation of the Java application

    In what circumstances, it is necessary that device a reboot after installing application OTA or via the Desktop Manager?

    How do no need to reboot after installing application OTA or via the Desktop Manager?
    config or file alx jad file?

    Thank you all.

    Hi yangjiang2k,

    try to find out the http://www.blackberry.com/developer/

    It contains many references...

    just to help you get started, try to read this:

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800620/What_Is...

    Cheers!

  • ADF mobile: access to the preferences of the java application

    Hello

    Jdev 11.1.2.3.0 + mobile extension.

    Where can I find examples of code or documentation to access preferences (adfmf-application configured. XML) from java code?

    concerning
    Peter

    Here you go:
    http://docs.Oracle.com/CD/E35521_01/doc.111230e24475.pdf

  • Changes in the driver vi using the Simulation Interface Toolkit (SIT) for PXI get do not appear.

    Hello

    I use Simulation Interface Toolkit to target a controller built in Simulink on a PXI target. I used the SIT connection manager to generate the driver screws I had to make some changes in the screw driver specifically Read.vi IO. I made the changes and the entire application runs without error. But the changes are not getting in the functioning of the application, essentially when I load the thing on PXI and run it, it contains exactly as it was before behaiving I made these changes. Some how the changes I make to the Read.vi of e/s are not begin day somewhere in the top vi driver.

    Could someone help me with this please.

    Eliane.

    Hi Justin_P,

    Thank you very much for the reply. Solved the problem. What you're saying, that's certainly true, but I do not use the project.

    The problem was that whenever it makes a change one driver that saw VI top-level driver must be opened and saved again. This opening and registration links the pilot with new changed correctly VI and then everything works fine.

    Thanks again.

    Eliane.

  • Accessing an application WebWorks built the database via a Java application

    Hi all

    My Java application needs to access a database that was created by a WebWorks built application. I see WebWorks encryption applications their databases using the code keys automatically signing. When I first tried to read the database, he said that it was encrypted as IOException: headers are encrypted. Since then, I installed the same key code in my Eclipse IDE to signature and have signed the java application with the same keys used by the WebWorks app. I always seem to get an IOException error, but this time it does not specify the exact error.

    Quite simply, I need to use the same database created in the WebWorks app in my Java application. Is it possible if I use the same code key for both signature requests? Or WebWorks uses a completely different algorithm to encrypt data in the database from Eclipse and so cannot use the same database?

    Thank you for all your help.

    Rob

    Yes, the DB is encrypted by default by using the identity of the application (code signing key and I believe in association with the name of the application)

    Thus, the type of DB of SQLite that is created from a WebWorks app is different from one created from a Java application, which can be a conflict at stake here.

    If you believe that it is a Google Gears database!

    https://github.com/BlackBerry/WebWorks/BLOB/master/framework/src/js/html5_init.js#L586

    Well Yes, to subsidize bequests to devices BBOS 5.0, which had no WebKit as web rendering engine, Gears is the 'wedge' up here.

    For the above reasons, I do not think that its going to be possible for you to achieve what you're trying with SQLite DB. To share data between applications on BBOS, you would need to use a different channel (encrypt the data and save it in the file system, or use your own remote web service + DB)

  • I have problems with my application of the java language.

    I have problems with my application of the java language. It will be open only for about one second, and it won't let me write all programs, it looks like the command prompt when opening. what the * is underway and what can I do to solve this problem.

    Hey Kevin,

    The description of the problem seems a little unclear and I wish I had a better understanding before you start working on it.

    I would really appreciate if you could answer the following questions:

    1. is the specific question of the application of the Java language?

    2. did you of recent changes made to your computer before the show?

    3. you receive an error code or message?

    Please provide us with more information on the specific question to help you to fix as soon as possible.

    If the problem is specific to the Java application, then I suggest you to contact Java support from the links below:

    http://www.Java.com/en/download/support.jsp

    Java Help Center:

    http://www.Java.com/en/download/help/

    Your response is very important for us to ensure a proper resolution. Please get back to us with the information above to help you accordingly.

  • How to remove the java logo in the win8 Panel

    Windows * 8, IE10

    I deleted my PC Java, but Java in the "Control Panel" icon is still present. When I select the icon, Windows 8 reports "application not found". This is normal since I uninstalled all Java programs.

    My question is how can I delete the icon Java in the 'control panel'-> 'Programs' page view. This icon was not deleted after that I uninstalled the Java application. I tried to run Sun's Java cleaner tool, but it signals no found Java applications. ???

    -Thank you

    You might want to give this a go.  This works for Windows 7 will work more than likely in Windows 8.

    Remove Java Control Panel Applet
    http://www.w7forums.com/remove-Java-Control-Panel-applet-t6325.html

    You can always reinstall Java and then uninstall it again.  With the help of administrator privileges where possible.  See if you can then adapt them to any installer or uninstaller.exe?

    Have you tried right clicking on the shortcut to the program or the .exe and select "Run As Administrator"?  Perform, even if your user name is an administrator.

    Try right click on the actual Setup.exe and choosing the option "Run As Administrator"?  Perform, even if your user name is an administrator.

    If you cannot use the above, and then enable the built-in administrator perform this work.  Disable the built-in administrator when you are finished.  The built-in administrator has more privileges than your own user name, even if you are an administrator.

    NET user administrator / Active: Yes

    NET user administrator / active: No.

    How to open a command prompt in Windows 8
    http://www.bleepingcomputer.com/tutorials/open-an-elevated-command-prompt-in-Windows-8/

  • The batch running of a Java application

    Hello

    Based on a processing thread archived on the same question, I understand that is the main method of com.oracle.determinations.batch.CmdLine must be run, using an array of strings as a parameter.

    Brad Tuckett has provided the basis for the following syntax:

    public static void main(String[] args)

    args is an array of strings corresponding to the arguments of the command line described in the section of the Guide to the developer of the OPA "set up the Batch Processor".

    But I am still unable to find a working syntax (after trying many); I always get the error:

    FATAL main HAND - configuration option not supported: - config C:/OPA/technical integration demo/projects/ODS - batch Processor/batch/fraud_score_config.xml

    com.oracle.determinations.batch.exceptions.ConfigurationException: unsupported configuration option: - config C:/OPA/technical integration demo/projects/ODS - batch Processor/batch/fraud_score_config.xml

    at com.oracle.determinations.batch.config.CmdLineConfigurationParser.getConfigurationOptions(CmdLineConfigurationParser.java:38)

    at com.oracle.determinations.batch.CmdLine.main(CmdLine.java:70)

    at com.example.batchproject.MainClass.main(MainClass.java:8)

    The procedure to follow when you run the batch processing of the command line is the following:

    In Windows Explorer, place you in the folder containing the configuration xml file, open a command prompt (SHIFT + right click and select "Open the window order here"), writing and the launch:

    java-jar... /Engine/determinations-batch.jar--config fraud_score_config.xml

    ... What then should be the exact syntax to use in the Java application?

    The following does not work for example:

    public static void main(String[] args) {
      String[] argsBatch = new String[1];
      argsBatch[0] = "--config C:/OPA/technical integration/demo projects/ODS - Batch Processor/batch/fraud_score_config.xml";
      com.oracle.determinations.batch.CmdLine.main(argsBatch);
    }
    

    Thanks in advance.

    Sense of space is important in the command line.  That's what Java use to split the command line in the args array.

    public static void main(String[] args) {
      String[] argsBatch = new String[2];
      argsBatch[0] = "--config";
      argsBatch[1] = "C:/OPA/technical integration/demo projects/ODS - Batch Processor/batch/fraud_score_config.xml";
      com.oracle.determinations.batch.CmdLine.main(argsBatch);
    }
    

Maybe you are looking for