#740 "INSERT-VALUES" statement functions doesn't get table name

open
Rob Manning
Unknown (89)
5
2013-09-05
2009-03-31
senga
No

Tests environment:
- SQuirreL 3.0.1 installed with squirrel-sql-3.0.1-install.jar on Windows XP SP3 + Oracle thin driver (ojdbc6.jar from oracle.com)
- Oracle server 9g (on Solaris)

Issue:
When displaying the data from a table, the right mouse menu options to copy UPDATE-SET or INSERT-VALUES clauses of selected data to clip board doesn't get the table name.

For exemple, when using these options, I got lines like :
UPDATE PressCtrlH SET ... WHERE
or
INSERT INTO PressCtrlH (...);

Of course, PressCtrlH is not the name of my table ;) and I got this for every tables... (it's always PressCtrlH).

Thanks

Discussion

  • senga
    senga
    2009-03-31

    For information : same problem when using mysql-connector-java-5.1.6-bin.jar on a MySQL 5 database!

     
  • woops, seems to be the same problem than 2693975, sorry :x

    To continue on this, I confirm I also have the "Qualify table names in generated scripts with schema" option enabled.

    Here is a copy of the log I get when I launch SQuirreL (french translation btw) :
    There are no more errors after that even when I try to generate SQL script.

    2009-04-02 16:16:03,644 [AWT-EventQueue-1] ERROR net.sourceforge.squirrel_sql.client.Application - Exception occured dispatching Event java.awt.event.WindowEvent[WINDOW_CLOSING,opposite=null,oldState=0,newState=0] on dialog0
    at net.sourceforge.squirrel_sql.plugins.oracle.OracleInternalFrame.internalFrameClosing(OracleInternalFrame.java:100)
    at net.sourceforge.squirrel_sql.plugins.oracle.SGAtrace.SGATraceInternalFrame.access$201(SGATraceInternalFrame.java:44)
    at net.sourceforge.squirrel_sql.plugins.oracle.SGAtrace.SGATraceInternalFrame$1.widgetClosing(SGATraceInternalFrame.java:82)
    at net.sourceforge.squirrel_sql.client.gui.desktopcontainer.WidgetEventCaster.fireWidgetClosing(WidgetEventCaster.java:56)
    at net.sourceforge.squirrel_sql.client.gui.desktopcontainer.DialogDelegate$1.windowClosing(DialogDelegate.java:42)
    at java.awt.AWTEventMulticaster.windowClosing(AWTEventMulticaster.java:332)
    at java.awt.Window.processWindowEvent(Window.java:1845)
    at javax.swing.JDialog.processWindowEvent(JDialog.java:633)
    at java.awt.Window.processEvent(Window.java:1803)
    at java.awt.Component.dispatchEventImpl(Component.java:4501)
    at java.awt.Container.dispatchEventImpl(Container.java:2081)
    at java.awt.Window.dispatchEventImpl(Window.java:2458)
    at java.awt.Component.dispatchEvent(Component.java:4331)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at net.sourceforge.squirrel_sql.client.Application$1.dispatchEvent(Application.java:195)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    2009-04-02 16:16:04,456 [AWT-EventQueue-1] INFO net.sourceforge.squirrel_sql.client.Application - Arrêt de lapplication {0}.
    2009-04-02 16:16:06,472 [AWT-EventQueue-1] ERROR net.sourceforge.squirrel_sql.client.session.SessionManager - Error closing Session
    java.lang.NullPointerException
    at net.sourceforge.squirrel_sql.plugins.oracle.OracleInternalFrame.internalFrameClosing(OracleInternalFrame.java:100)
    at net.sourceforge.squirrel_sql.plugins.oracle.SGAtrace.SGATraceInternalFrame.access$201(SGATraceInternalFrame.java:44)
    at net.sourceforge.squirrel_sql.plugins.oracle.SGAtrace.SGATraceInternalFrame$1.widgetClosing(SGATraceInternalFrame.java:82)
    at net.sourceforge.squirrel_sql.client.gui.desktopcontainer.WidgetEventCaster.fireWidgetClosing(WidgetEventCaster.java:56)
    at net.sourceforge.squirrel_sql.client.gui.desktopcontainer.DialogDelegate.fireWidgetClosing(DialogDelegate.java:225)
    at net.sourceforge.squirrel_sql.client.gui.desktopcontainer.DialogWidget.fireWidgetClosing(DialogWidget.java:166)
    at net.sourceforge.squirrel_sql.client.gui.desktopcontainer.SessionDialogWidget.closeFrame(SessionDialogWidget.java:41)
    at net.sourceforge.squirrel_sql.client.gui.WindowManager$SessionListener.sessionClosing(WindowManager.java:1234)
    at net.sourceforge.squirrel_sql.client.session.SessionManager.fireSessionClosing(SessionManager.java:479)
    at net.sourceforge.squirrel_sql.client.session.SessionManager.closeSession(SessionManager.java:282)
    at net.sourceforge.squirrel_sql.client.session.SessionManager.closeAllSessions(SessionManager.java:359)
    at net.sourceforge.squirrel_sql.client.Application.closeAllSessions(Application.java:428)
    at net.sourceforge.squirrel_sql.client.Application.shutdown(Application.java:276)
    at net.sourceforge.squirrel_sql.client.gui.mainframe.MainFrame.dispose(MainFrame.java:141)
    at net.sourceforge.squirrel_sql.client.gui.mainframe.MainFrame$6.windowClosing(MainFrame.java:414)
    at java.awt.AWTEventMulticaster.windowClosing(AWTEventMulticaster.java:332)
    at java.awt.Window.processWindowEvent(Window.java:1845)
    at javax.swing.JFrame.processWindowEvent(JFrame.java:279)
    at java.awt.Window.processEvent(Window.java:1803)
    at java.awt.Component.dispatchEventImpl(Component.java:4501)
    at java.awt.Container.dispatchEventImpl(Container.java:2081)
    at java.awt.Window.dispatchEventImpl(Window.java:2458)
    at java.awt.Component.dispatchEvent(Component.java:4331)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at net.sourceforge.squirrel_sql.client.Application$1.dispatchEvent(Application.java:195)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    2009-04-02 16:16:06,472 [AWT-EventQueue-1] INFO net.sourceforge.squirrel_sql.client.Application - Interruption de larrêt de lapplication 02/04/09 16:16.
    2009-04-02 16:16:13,629 [main] INFO net.sourceforge.squirrel_sql.client.SquirrelLoggerFactory - #############################################################################################################
    2009-04-02 16:16:13,629 [main] INFO net.sourceforge.squirrel_sql.client.SquirrelLoggerFactory - # Starting Client SQL SQuirreL Version 3.0.1 at 02/04/09 16:16
    2009-04-02 16:16:13,629 [main] INFO net.sourceforge.squirrel_sql.client.SquirrelLoggerFactory - #############################################################################################################
    2009-04-02 16:16:13,644 [main] INFO net.sourceforge.squirrel_sql.client.SquirrelLoggerFactory - Client SQL SQuirreL Version 3.0.1 started: Thu Apr 02 16:16:13 CEST 2009
    2009-04-02 16:16:13,644 [main] INFO net.sourceforge.squirrel_sql.client.SquirrelLoggerFactory - Copyright (c) 2001-2006 Colin Bell, Gerd Wagner, Rob Manning et autres
    2009-04-02 16:16:13,644 [main] INFO net.sourceforge.squirrel_sql.client.SquirrelLoggerFactory - java.vendor: Sun Microsystems Inc.
    2009-04-02 16:16:13,644 [main] INFO net.sourceforge.squirrel_sql.client.SquirrelLoggerFactory - java.version: 1.6.0_11
    2009-04-02 16:16:13,644 [main] INFO net.sourceforge.squirrel_sql.client.SquirrelLoggerFactory - java.runtime.name: Java(TM) SE Runtime Environment
    2009-04-02 16:16:13,644 [main] INFO net.sourceforge.squirrel_sql.client.SquirrelLoggerFactory - os.name: Windows XP
    2009-04-02 16:16:13,644 [main] INFO net.sourceforge.squirrel_sql.client.SquirrelLoggerFactory - os.version: 5.1
    2009-04-02 16:16:13,644 [main] INFO net.sourceforge.squirrel_sql.client.SquirrelLoggerFactory - os.arch: x86
    2009-04-02 16:16:13,644 [main] INFO net.sourceforge.squirrel_sql.client.SquirrelLoggerFactory - user.dir: C:\Program Files\SQuirreL SQL Client
    2009-04-02 16:16:13,644 [main] INFO net.sourceforge.squirrel_sql.client.SquirrelLoggerFactory - user.home: C:\Documents and Settings\maugerbruna
    2009-04-02 16:16:13,644 [main] INFO net.sourceforge.squirrel_sql.client.SquirrelLoggerFactory - java.home: D:\30-Dev\jdk1.6.0_11\jre
    2009-04-02 16:16:13,644 [main] INFO net.sourceforge.squirrel_sql.client.SquirrelLoggerFactory - java.class.path: C:\Program Files\SQuirreL SQL Client\squirrel-sql.jar;C:\Program Files\SQuirreL SQL Client\lib\antlr.jar;C:\Program Files\SQuirreL SQL Client\lib\asm-attrs.jar;C:\Program Files\SQuirreL SQL Client\lib\asm.jar;C:\Program Files\SQuirreL SQL Client\lib\cglib.jar;C:\Program Files\SQuirreL SQL Client\lib\commons-cli.jar;C:\Program Files\SQuirreL SQL Client\lib\commons-codec.jar;C:\Program Files\SQuirreL SQL Client\lib\commons-collections.jar;C:\Program Files\SQuirreL SQL Client\lib\commons-httpclient.jar;C:\Program Files\SQuirreL SQL Client\lib\commons-logging.jar;C:\Program Files\SQuirreL SQL Client\lib\dom4j.jar;C:\Program Files\SQuirreL SQL Client\lib\ejb3-persistence.jar;C:\Program Files\SQuirreL SQL Client\lib\forms.jar;C:\Program Files\SQuirreL SQL Client\lib\fw.jar;C:\Program Files\SQuirreL SQL Client\lib\hibernate-annotations.jar;C:\Program Files\SQuirreL SQL Client\lib\hibernate-commons-annotations.jar;C:\Program Files\SQuirreL SQL Client\lib\hibernate-entitymanager.jar;C:\Program Files\SQuirreL SQL Client\lib\hibernate.jar;C:\Program Files\SQuirreL SQL Client\lib\jxl.jar;C:\Program Files\SQuirreL SQL Client\lib\log4j.jar;C:\Program Files\SQuirreL SQL Client\lib\mysql-connector-java-5.1.6-bin.jar;C:\Program Files\SQuirreL SQL Client\lib\nanoxml.jar;C:\Program Files\SQuirreL SQL Client\lib\ojdbc6.jar;C:\Program Files\SQuirreL SQL Client\lib\openide-loaders.jar;C:\Program Files\SQuirreL SQL Client\lib\openide.jar;C:\Program Files\SQuirreL SQL Client\lib\org-netbeans-modules-editor-fold.jar;C:\Program Files\SQuirreL SQL Client\lib\org-netbeans-modules-editor-lib.jar;C:\Program Files\SQuirreL SQL Client\lib\org-netbeans-modules-editor-util.jar;C:\Program Files\SQuirreL SQL Client\lib\org-netbeans-modules-editor.jar;C:\Program Files\SQuirreL SQL Client\lib\spring-beans.jar;C:\Program Files\SQuirreL SQL Client\lib\spring-context-support.jar;C:\Program Files\SQuirreL SQL Client\lib\spring-context.jar;C:\Program Files\SQuirreL SQL Client\lib\spring-core.jar;C:\Program Files\SQuirreL SQL Client\lib\squirrel-sql_bg_BG.jar;C:\Program Files\SQuirreL SQL Client\lib\squirrel-sql_cs_CZ.jar;C:\Program Files\SQuirreL SQL Client\lib\squirrel-sql_de_DE.jar;C:\Program Files\SQuirreL SQL Client\lib\squirrel-sql_es.jar;C:\Program Files\SQuirreL SQL Client\lib\squirrel-sql_fr.jar;C:\Program Files\SQuirreL SQL Client\lib\squirrel-sql_it_IT.jar;C:\Program Files\SQuirreL SQL Client\lib\squirrel-sql_pt_BR.jar;C:\Program Files\SQuirreL SQL Client\lib\squirrel-sql_ru.jar;C:\Program Files\SQuirreL SQL Client\lib\squirrel-sql_zh_CN.jar;C:\Program Files\SQuirreL SQL Client\lib\stringtemplate.jar;C:\Program Files\SQuirreL SQL Client\lib\syntax.jar;C:\Program Files\SQuirreL SQL Client\lib\versioncheck.jar;
    2009-04-02 16:16:18,191 [main] INFO net.sourceforge.squirrel_sql.plugins.refactoring.prefs.RefactoringPreferencesManager - prefs.xml not found - will be created
    2009-04-02 16:16:18,207 [main] INFO net.sourceforge.squirrel_sql.client.Application - Complément dataimport créé en 0 ms, chargé en 0 ms, initialisé en 16 ms, total 16 ms.
    2009-04-02 16:16:18,207 [main] INFO net.sourceforge.squirrel_sql.client.Application - Complément sqlparam créé en 0 ms, chargé en 0 ms, initialisé en 0 ms, total 0 ms.
    2009-04-02 16:16:18,207 [main] INFO net.sourceforge.squirrel_sql.client.Application - Complément sqlval créé en 16 ms, chargé en 0 ms, initialisé en 16 ms, total 32 ms.
    2009-04-02 16:16:18,207 [main] INFO net.sourceforge.squirrel_sql.client.Application - Complément oracle créé en 15 ms, chargé en 0 ms, initialisé en 15 ms, total 30 ms.
    2009-04-02 16:16:18,223 [main] INFO net.sourceforge.squirrel_sql.client.Application - Complément postgres créé en 0 ms, chargé en 0 ms, initialisé en 16 ms, total 16 ms.
    2009-04-02 16:16:18,223 [main] INFO net.sourceforge.squirrel_sql.client.Application - Complément sessionscript créé en 0 ms, chargé en 0 ms, initialisé en 0 ms, total 0 ms.
    2009-04-02 16:16:18,223 [main] INFO net.sourceforge.squirrel_sql.client.Application - Complément sqlbookmark créé en 0 ms, chargé en 0 ms, initialisé en 15 ms, total 15 ms.
    2009-04-02 16:16:18,223 [main] INFO net.sourceforge.squirrel_sql.client.Application - Complément sqlreplace créé en 0 ms, chargé en 0 ms, initialisé en 0 ms, total 0 ms.
    2009-04-02 16:16:18,223 [main] INFO net.sourceforge.squirrel_sql.client.Application - Complément editextras créé en 0 ms, chargé en 0 ms, initialisé en 16 ms, total 16 ms.
    2009-04-02 16:16:18,223 [main] INFO net.sourceforge.squirrel_sql.client.Application - Complément laf créé en 0 ms, chargé en 625 ms, initialisé en 0 ms, total 625 ms.
    2009-04-02 16:16:18,223 [main] INFO net.sourceforge.squirrel_sql.client.Application - Complément smarttools créé en 0 ms, chargé en 0 ms, initialisé en 0 ms, total 0 ms.
    2009-04-02 16:16:18,223 [main] INFO net.sourceforge.squirrel_sql.client.Application - Complément syntax créé en 0 ms, chargé en 0 ms, initialisé en 31 ms, total 31 ms.
    2009-04-02 16:16:18,223 [main] INFO net.sourceforge.squirrel_sql.client.Application - Complément graph créé en 0 ms, chargé en 0 ms, initialisé en 16 ms, total 16 ms.
    2009-04-02 16:16:18,223 [main] INFO net.sourceforge.squirrel_sql.client.Application - Complément mssql créé en 16 ms, chargé en 0 ms, initialisé en 0 ms, total 16 ms.
    2009-04-02 16:16:18,223 [main] INFO net.sourceforge.squirrel_sql.client.Application - Complément codecompletion créé en 0 ms, chargé en 0 ms, initialisé en 16 ms, total 16 ms.
    2009-04-02 16:16:18,223 [main] INFO net.sourceforge.squirrel_sql.client.Application - Complément i18n créé en 0 ms, chargé en 0 ms, initialisé en 0 ms, total 0 ms.
    2009-04-02 16:16:18,223 [main] INFO net.sourceforge.squirrel_sql.client.Application - Complément sqlscript créé en 0 ms, chargé en 0 ms, initialisé en 15 ms, total 15 ms.
    2009-04-02 16:16:18,223 [main] INFO net.sourceforge.squirrel_sql.client.Application - Complément dbcopy créé en 0 ms, chargé en 0 ms, initialisé en 16 ms, total 16 ms.
    2009-04-02 16:16:18,223 [main] INFO net.sourceforge.squirrel_sql.client.Application - Complément db2 créé en 16 ms, chargé en 0 ms, initialisé en 0 ms, total 16 ms.
    2009-04-02 16:16:18,223 [main] INFO net.sourceforge.squirrel_sql.client.Application - Complément refactoring créé en 0 ms, chargé en 0 ms, initialisé en 15 ms, total 15 ms.
    2009-04-02 16:16:18,223 [main] INFO net.sourceforge.squirrel_sql.client.Application - Complément mysql créé en 0 ms, chargé en 0 ms, initialisé en 16 ms, total 16 ms.

     
  • Alejandro
    Alejandro
    2011-04-15

    Well, this is still happening on version 3.0, MySQL 5.1.12 and MySQL Plugin 0.33

     
  • This PressCtrlH behaviour has been around for a *very long* time (have observed it from Squirrel SQL 1.2 up to 3.2). I even wondered if it was a *feature* to prevent unwanted insertion or to propose a replacement with another table name, since Ctrl+H is usually (and is in Squirrel SQL) a shortcut for "replacement" action... then it just tells you how to replace the PressCtrlH with whatever table you want to insert to/update...

     
  • ArneD
    ArneD
    2013-09-05

    The issue is still present in 3.5.0.

    If I create a data script of the whole table, everthing is fine. But if I only want to copy some selected records from a table with the "Copy as SQL INSERT-VALUES statement" the table name is missing / replaced by PressCtrlH

    Regards

    Arne