Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#507 Squirrel imports BLOB, but does not update data

2.5
closed-fixed
Rob Manning
Core (461)
5
2014-08-21
2007-04-12
Anonymous
No

Hi,

I have Squirrel 2.5 on a Postgres 8.0 database. I have a table, say XXX, with a BLOB (actually, BYTEA). I go to the SQL tab, type 'SELECT * FROM XXX' and execute. On the result I right-click and choose 'Make editable'. I click on data from the bytea column and a panel opens. I select 'Browse' and choose a very simple text file. Then I click 'Import'. The yellow area changes, and showing the value as ASCII confirms that data has been correctly read. Now I click on "Update data" and the button goes "down" and does not return "up". If I move the mouse, the button comes "up". However, the content of the field does not change at all.

I verified the same bug in Squirrel 2.4 .

On the other hand, selecting the tab "Objects", selecting the XXX table and performing the same operations does work as expected. More precisely, the "Update data" button comes "up" and data is changed.

This is quite mysterious to me. I can be contacted at aspinelli at imteam dot it .

Thanks in advance
Andrea Spinelli

The latest error is:

Scritto su log da class net.sourceforge.squirrel_sql.client.Application alle 12/04/07 16.10:

Exception occured dispatching Event java.awt.event.MouseEvent[MOUSE_RELEASED,(805,609),button=1,modifiers=Button1,clickCount=1] on frame0

and its trace is

java.lang.ClassCastException: java.lang.String
at net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.DataTypeBinary.areEqual(DataTypeBinary.java:113)
at net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.CellComponentFactory.areEqual(CellComponentFactory.java:190)
at net.sourceforge.squirrel_sql.fw.datasetviewer.DataSetViewerEditableTablePanel.changeUnderlyingValueAt(DataSetViewerEditableTablePanel.java:199)
at net.sourceforge.squirrel_sql.fw.datasetviewer.MyTableModel.setValueAt(MyTableModel.java:164)
at net.sourceforge.squirrel_sql.fw.gui.SortableTableModel.setValueAt(SortableTableModel.java:135)
at javax.swing.JTable.setValueAt(Unknown Source)
at net.sourceforge.squirrel_sql.fw.datasetviewer.DataSetViewerTablePanel$MyJTable.setValueAt(DataSetViewerTablePanel.java:354)
at net.sourceforge.squirrel_sql.fw.datasetviewer.CellDataPopup$ColumnDataPopupPanel$1.actionPerformed(CellDataPopup.java:266)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at net.sourceforge.squirrel_sql.client.Application$1.dispatchEvent(Application.java:168)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Discussion

  • Rob Manning
    Rob Manning
    2007-04-13

    • assigned_to: colbell --> manningr
    • status: open --> closed-fixed
     
  • Rob Manning
    Rob Manning
    2007-04-13

    Logged In: YES
    user_id=1287991
    Originator: NO

    It seems that somewhere along the way we would convert the newvalue into a String for certain input files (it seemed to be non-binary ASCII files that were getting this treatment). I was able to reproduce it only by importing binary file into the dialog then in the background, changing the highlighted cell in the SQL execution results panel. This is now fixed in CVS and will be available in this weekend's snapshot.

    Rob