Cancelling a query by pressing ESC key?

Hi all,
I want to cancel a running query by pressing the ESCAPE key in the keyboard. How to do it.??

rahul0471 wrote:
Hi all,
I want to cancel a running query by pressing the ESCAPE key in the keyboard. How to do it.??There is a cancel() method in Statement that you can call.
http://java.sun.com/j2se/1.4.2/docs/api/java/sql/Statement.html#cancel()
It depends on the database and the driver where the cancel() method is supported.

Similar Messages

  • Stop the Script - Pressing 'ESC' Key - Need Solutions.

    Dear All,
    Really I'm wondering "Press 'ESC' Key" the Script is Stopped. But OtherApplication 'EXE''s are not stopped even InDesign Plug-In also.
    Is there any solutions while I'm pressing 'ESC' key the InDesign Script is automatically stopped. But I need to run the script without any interruption using this 'ESC' or other keys. I tried so many RnD's, But I didn't get any solutuions.
    Please any one can knows let me know the solutions .
    Please any one can give the solutions I can appreciate.
    Thanks & Regards,
    Harihara SudhaN.T.R.

    Dear Harbs & Peter Kahrel
    Many thanks for this great replies.
    "I should try running scripts from the palette" - Peter Kahrel.
    I'm also tried so many times, but the script is stopped when I press [Interupt] the "Esc" KEY Button.
    One of my friend suggested "TSR" Programming to use comment the "ESC" KEY button action, after that running the ESTK Script then finally activate the "ESC" KEY button action. [Both STOP and START the "ESC" KEY Button action though create the "TSR" programming]
    1. Is it possible to Stop & Start the "ESC" KEY Button create through TSR Programming?
    2.  TSR Program we can use to ESTK script - is it possible?.
    I dont know what exactly the "Esc" Button is doing the operation. But the same time "Esc" Button is equal to "Cancel" button functionality - Java script Reference Guide mentioned.
    So what my understand in this ESTK - script is "ESC" button means "Cancel" button... I'm I right ? or else...
    Many thanks once again for the favour replies and pelase Mr. Harbs and Mr.Perter Kahrel let me know some more informations regarding this issue.
    I expect the detailed information regarding this issue, Please.
    Thanks & Regards
    Harihara SudhaN.T.R.,

  • Laptop shows "press esc key for startup menu". Wont start up normally?

    Hi,
    I have an hp pavillion g6 laptop (Product QE05UA#ABA, Model: g6-1c35dx)
    . For a while its been causing problems, it's been slow, showing viruses, and now it wont start up.
    I left it on sleep mode last night, once i opened it up today it was turned off. I figured it lost battery which usually doesnt happen, but I turned it on and it shows a blinking screen that comes on and then turns black, over and over. the blinking screen shows "press esc key for startup menu".
    Also, the caps lock key blinks once when that screen comes on.
    When I  push "esc" it shows this:
    F1 system info
    F2 system diagnostics
    F9 boot device options
    F10 bios setup
    F11 system recovery
    Enter- continue startup
    I've tried them all, including some tests in "bios setup"
    Dont know much about computers, and this is one that i need so help is greatly appreciated.

    Hi @Hp222 ,
    Thank you for visiting the HP Support Forums and Welcome. I have looked into your issue about your HP Pavilion g6-1c35dx Notebook and issues with starting.
    Try to turn on the computer you start to press F11 repeatedly till the menu opens. You can do a system restore. System restore will help if something automatically updated and did not go well on the Notebook. The document also gives you information on what to do if Windows does not start normally.
    When performing a System restore please note remove any and all USB devices. Disconnect all non-essential devices as they can cause issues.
    Thanks.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the bottom to say “Thanks” for helping!

  • ParentDialog disposing on pressing ESC key on JOptionPane????????

    I am using a JDialog which disposes on pressing ESC keu, i am also using JOptionPane for
    popping up some messages from this dialog. Problem is when i use the ESC key for disposing
    JOptionPane my dialog is also getting disposed. I am creating dialog like
    public MyDialog(Frame rootFrame)
    super( rootFrame,true );
    addKeyListener(new KeyAdapter()
    public void keyReleased(KeyEvent e)
    if ( e.getKeyCode() == KeyEvent.VK_ESCAPE)
    dispose();
    I am not getting the problem. Can anyone help me?
    Thanks in advance

    Hi guys,
    Perhaps you should try using e.consume() in your event handler...
    Another way is to let the parent frame know, in its event handler, which is the source object from where the event originated.
    something like:
       // Before showing the dialog
       yourDialog.setName("yourDialog");
       yourDialog.setVisible(true);
       // in the frame's event handler
       public void keyReleased(KeyEvent e) {
          if (e.getKeyCode() == KeyEvent.VK_ESCAPE)
                Component compsource = (Component)e.getSource();
                String compname = compsource.getName();
                if (compname.equals("yourDialog")) {
                   ((Dialog)compsource).dispose();
       } I hope these few ideas will help!
    Regards.

  • Exiting from a FORM while pressing ESC key !

    Hiiiiii !
    I am using Forms 6i. Is there any way that i may exit from a form while just pressing the ESC key ?
    Capri !
    Message was edited by:
    Capri

    when you start your runform via
    ifrun60.EXE myForm pa_username=myUser
    you can use this parameter for your new Resource-File, which you have saved from within Oracle Terminal :
    ifrun60.EXE myForm pa_username=myUser term=myTermFile.res
    try it
    Gerd

  • Closing window by pressing ESC

    Hi All,
    I am using Object oriented ALV Grid.To validate user input inside the Grid i used the DATA_CHANGED event.
    Inside the Method handled_data_changed (Method for the event DATA_CHANGED) validating input and showing error by Using the method ADD_PROTOCOL_ENTRY of class CL_ALV_CHANGED_DATA_PROTOCOL and for display the error message DISPLAY_PROTOCOL.
    It is showing the error message in separate dialogue window.But when press close icon(X) then only it will close the window.I want to close the window even i press ESC key.While pressing ESC key,it is not closing that error screen.kindly help me to perform closing window while pressing ESC key..
    Kindly anyone can give some related hints atleast for my question.
    Thanks in Advance...
    Edited by: anuroop on Feb 27, 2009 10:53 AM

    <mrtotes hangs head in shame> I turned off Mouse Keys. All sorted. </mrtotes hangs head in shame>
    cheers
    mrtotes

  • Show press ESC to startup menu

    As I start up my laptop it shows press ESC key to startup menu ..and show nothing and repdately keeps on asking the same press ESC key to startup menu...help me out..

    Hello , Welcome to the HP Forums, I hope you enjoy your experience! To help you get the most out of the HP Forums, I would like to direct your attention to the HP Forums Guide First Time Here? Learn How to Post and More. I read your post about the start up menu, and wanted to help! Did you get Recovery Discs with your unit?  If so, try booting from the Recovery Disc.  If not, then you may need to reseat the Hard Drive.  You can use the following document to assist you, if needed:HP 2000 Notebook PC Maintenance and Service Guide (Chapter 4, Page 51-53). Please let me know if this information was helpful by clicking the thumbs up below.
    Have a great day!

  • Press the esc key for startup menu

    My HP mini netbook won'tload to the start-up page.  I'm using Windows 7. I get the following messgae "Press the Esc key for startup menu" but when I do nothing happens.

    Did you follow the steps in the last post?  Did anything change?  If you cannot get into the BIOS, then it is done.  Try a BIOS recovery.  Some of the newer computers motherboards have a BIOS recovery but I cannot tell if that is one.
    {---------- Please click the "Thumbs Up" to say thanks for helping.
    Please click "Accept As Solution" if my help has solved your problem. ----------}
    This is a user supported forum. I am a volunteer and I do not work for HP.

  • I have a problem in iPhone . When you receive a contact and press the key at the top to cancel the contact screen stopped working .ataml times after the last restart device

    I have a problem in iPhone . When you receive a contact and press the key at the top to cancel the contact screen stopped working .ataml times after the last restart device

    Since restarting did not help, reset your iPhone, see: Turn your iOS device off and on (restart) and reset  http://support.apple.com/kb/ht1430
    If that still does not solve it, check, if the contact you are trying to add is problematic. Try to save a different contact. Does that work?
    If not, reinstall the Contacts app. This is only possible by restoring your iPhone, unfortunately.
    See: Use iTunes to restore your iOS device to factory settings  http://support.apple.com/kb/HT1414

  • "Contacting the server for information. Press ESC to cancel." in Excel when opening

    I havea user that when she open an Excel file that is older format 97-2003 it just says "Contacting the server for information. Press ESC to cancel." in the status bar then it hangs.  If she press esc about 20 times she get to see the
    document but then Excel just hangs and is unresponsive. I dont know if the documents have some connection to template but the user says they dont. Is there any way to disable this behavior ?
    I have searched everywhere for a solution but everything is about Word or Outlook and none of those can be applied to Excel.

    We had the same issue, however counting for all Office applications including Access.
    Thus, something told me this couldn't be application specific, which ruled out the dozens of suggestions you can browse to solve this issue, including removing of printer drivers, Share Point access (we have no SP running), plug-ins, malformed normal.dot,
    wrong Registry entries, etc. Antivirus and firewall had also temporarily been disabled with no change.
    Also, network shares were marked as "safe" and included as trusted locations.
    What pointed to the solution was this:
    1. When a trusted location was added in, say, Word, the path, say, T:\Documents was automatically changed to the shared path of our DFS file servers:
    \\ourdomain.local\data\department\data\document
    2. When I logged in with my Domain Admin account, the issue did not exist.
    Thus, it had to do with permissions.
    Users had full rights to the network share, here T:\Documents.
    They also had read/write rights to the DFS _share_. However, they had no Active Directory rights to the root of DFS, \\ourdomain.local
    Adding Domain Users with browse and read rights to
    \\ourdomain.local solved the issue at once.
    /gustav
    Gustav Brock

  • Want to close  JInternalFrame when user press OR release "Esc" key.

    i want to close JInternalFrame when user press OR release "Esc" key.
    i am trying that
    but nothing print on console
    public class IFTest extends javax.swing.JInternalFrame {
        public IFTest() {
            initComponents();
        private void initComponents() {
            setClosable(true);
            addKeyListener(new java.awt.event.KeyAdapter() {
                public void keyPressed(java.awt.event.KeyEvent evt) {
                    formKeyPressed(evt);
                public void keyReleased(java.awt.event.KeyEvent evt) {
                    formKeyReleased(evt);
                public void keyTyped(java.awt.event.KeyEvent evt) {
                    formKeyTyped(evt);
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 394, Short.MAX_VALUE)
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 278, Short.MAX_VALUE)
            pack();
        private void formKeyPressed(java.awt.event.KeyEvent evt) {
            System.out.println("formKeyPressed");
        private void formKeyReleased(java.awt.event.KeyEvent evt) {
           System.out.println("formKeyReleased");
        private void formKeyTyped(java.awt.event.KeyEvent evt) {
           System.out.println("formKeyTyped");
    }

    i don ti thanks
    public class IFTest extends javax.swing.JInternalFrame {
        public IFTest() {
            initComponents();
             this.getActionMap().put("test", new AbstractAction(){
                public void actionPerformed(ActionEvent e) {
                    System.out.println("Escape Pressed");
            InputMap map = this.getInputMap(WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
            KeyStroke stroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0);
            map.put(stroke,"test");
        private void initComponents() {
            setClosable(true);
            addKeyListener(new java.awt.event.KeyAdapter() {
                public void keyPressed(java.awt.event.KeyEvent evt) {
                    formKeyPressed(evt);
                public void keyReleased(java.awt.event.KeyEvent evt) {
                    formKeyReleased(evt);
                public void keyTyped(java.awt.event.KeyEvent evt) {
                    formKeyTyped(evt);
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 394, Short.MAX_VALUE)
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 278, Short.MAX_VALUE)
            pack();
        private void formKeyPressed(java.awt.event.KeyEvent evt) {
            System.out.println("formKeyPressed");
        private void formKeyReleased(java.awt.event.KeyEvent evt) {
           System.out.println("formKeyReleased");
        private void formKeyTyped(java.awt.event.KeyEvent evt) {
           System.out.println("formKeyTyped");
    }

  • HP DV5 laptop suddenly doesn't boot - Press the esc key for boot sequence

    Suddenly my laptop has stopped working.  It's on the first boot screen with HP logo and Press esc to get the boot sequence. Pressing esc doesn't take me anywhere.
    I tried removing the battery and directly connecting it to the power cord and it's the same
    When i try to press F10 as soon as the system gets powered on..i get " F10...BIOS setup options : alond with the hp logo and nothing after that.
    I have tried removing the harddrive and plugin it again , But nothing worked.  Any help on this is much appreciated.

    Hello @bsm_a,
    Welcome to the HP support forums. From what you have posted you are having a boot issue. For us to help you better could you please provide some more important information.
    Please provide your full Model number and Product number. If you need help finding this.  Click Here
    As well could you provide the Operating System with any service pack information.  Click Here
    Please post back soon.
    Thank you and have a great day.
    Please click the "Thumbs Up" on the bottom right of this post to say thank you if you appreciate the support I provide!
    Also be sure to mark my post as “Accept as Solution" if you feel my post solved your issue, it will help others who face the same challenge find the same solution.
    D5GR
    I work on behalf of HP

  • PSE6 blocks Esc key on Vista

    Hi,
    I have a common problem with Photoshop Elements 6 on Windows Vista (both 32bit and 64bit versions):
    It blocks the Esc key in all other applications! (As long as PSE6 is running, pressing the Esc key in any other windows than its own has no function. This is really annoying, as the Esc key is used like the "cancel" button in almost any window.)
    I know the workaround with pressing Shift+Esc - but isn't there any bugfix released by Adobe? Or do they just ignore it and go around blocking keys on all computers...
    -Frank

    See this thread
    http://www.adobeforums.com/webx/.3c051f74/16

  • How to use "Esc" key to call a function in scripting

    I mean when I'm executing a script,if I want break a loop, I can just press the "Esc" key.I think this is very handly.But I also want to call a function when "Esc" is pressed,is this possible, and how can I do this?

    Taken from Peter Kahrel's UI guide.
    http://www.kahrel.plus.com/indesign/scriptui-2-0.pdf
    So escape could be captured by if(myWindow.show()==2){do stuff }?
    the user clicks OK (which in this script corresponds to pressing Enter) or they can click
    Cancel (which is the equivalent of pressing Escape). The window's behaviour is
    this: if the user presses OK, the line myWindow.show ( ) returns 1, if they press
    Esc, that line returns 2. We capture this as follows:
    if (myWindow.show () == 1)
    var myName = myText.text;
    else
    exit ();

  • Cancel ENTER-QUERY

    Hello! I am in ENTER-QUERY mode and I want to Cancel a query pressing a button from a menu that has an option Cancel-query with following code:
    IF name_in('System.Mode') = 'ENTER-QUERY' THEN
         exit_form(NO_VALIDATE);
    end if;
    But when I press the menu the FORM exits. what could it be happening ?
    Thank you in advance.

    Sorry, I realize ...
    when exit_form(NO_VALIDATE) is executed, the trigger KEY-EXIT is firing and I did not know this.

Maybe you are looking for