DND Tables with JTextField Editors Mouse Problem

Hello!
I am trying to be able to drag and drop between two tables and within a table and also use a TextArea as the editor of the cells. I am having the following problem:
When I click on a cell both the drag_start and the cell is in editor mode so I
a. created a MouseDragGestureRecognizer MyDGR and set dragSource.createDragGestureRecognizer(MyDGR.class() ,this,DnDConstants.ACTION_COPY_OR_MOVE,this) in my DNDTable class.
This did not run mouseDragged function but when I added a MouseMotionListener in the registerListeners function it called that mouseDragged function even when I just clicked on a cell.
b. In "class TextAreaEditor extends DefaultCellEditor", I have set clickCountToStart to 2.
I would like to be able to double click and go into editing mode in the cell and if I click and hold then I would like to enter DND mode.
Any help would be appreciated =)

I have created my own TextField and TextArea classesUse better names to avoid confusion with the AWT TextField and TextArea components.
Can anyone tell me why this may be happening?No, because we don't know what custom changes you have made to the components.
If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program (SSCCE) that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
And don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags so the code retains its original formatting.

Similar Messages

  • Scrollable table with fixed column headings problem

    Dear list members,
    A while ago I asked on this forum for a way to code a
    scrollable table with fixed headings and I was kindly given the
    HTML and CSS code to do that. Using the method I was given I coded
    the following simple test case. It works under IE but under
    Netscape the column headings scroll up instead of remaining fixed.
    The code works fine in IE. Can anyone tell me what I'm doing wrong
    or if there is a workaround.
    Thanks,
    Harry

    The method you were given will only work in IE because only
    IE understands
    "expression" in CSS rules.
    I'm afraid things are going to be a little more complicated
    for you, but
    it's not impossible.
    Give this method a shot:
    http://www.imaputz.com/cssStuff/bulletVersion.html
    "harryspier" <[email protected]> wrote in
    message
    news:e53s1a$dv9$[email protected]..
    > <style>
    > div .headings {position:relative;
    > top:expression(this.offsetParent.scrollTop);}
    > </style>

  • How to fill internal table with no data in debugging mode

    Hi all,
             I modified one existing program.Now I want to test it.I am not given test data.So in the middle of my debugging, I found that one internal table with no data.My problem is how to fill that internal table with few records in that debugging mode just as we change contents in debugging mode.If I want to proceed further means that internal table must have some records.
    Please I dont know how to create test data so I am trying to create values temporarily in debugging mode only.
    Thanks,
    Balaji

    Hi,
    In the debugging do the following..
    Click the Table button..
    Double click on the internal table name..
    Then in the bottom of the screen you will get the buttons like CHANGE, INSERT, APPEND, DELETE..
    Use the APPEND button to insert records to the internal table..
    Thanks,
    Naren

  • Pls help with JTree editor problem

    Hi,
    I have a JTree where each node in the tree is a JPanel. In each
    JPanel are two JTextField objects. Only one of the JTextField objects
    is editable.
    When I click on node (a line in the JTree) with the mouse, it is
    painted using the custom editor (TreeCellEditor) that I have written.
    When the selected and editable JTextField has the focus, and when a
    certain key is hit, I capture that key, do some things, and then select
    a different node in the JTree.
    When selecting the new node, I need the node to be painted with
    the editor, just as if I had clicked on it with the mouse.
    In the method called as a result of the key binding, I call the
    following --
    TreeUI.stopEditing( JTree ) -- stops editing of the cell that resulted
    in the key binding call
    TreeUI.startEditingAtPath( JTree, TreePath )
    -- according to the JavaDocs, this should select the new cell and
    start editting of it.
    This last method does call my editor to get the components, but then my
    Renderer is also called (twice in fact). When the cell is painted, it is
    painted with the Renderer's components.
    PLEASE HELP HERE !

    Thank you so much for giving a reply to this problem.
    I will experiment with your suggestion. However, in looking at the JavaDocs
    I would need to make one class that implements both TreeCellEditor and
    TreeCellRenderer, with the methods getTreeCellEditorComponent() and getTreeCellRendererComponent(). Since currently, my editor is called and then
    my renderer is called, over-writing the editor's result, I would suspect that
    both of these methods would also be called (even though they are in the same
    class), having the same effect.
    Again, thank you.

  • Table with a textArea editor doesn't stop editing

    I need to have a table with TextArea as editor (to show the information) but it must be changed through a Dialog and return to the render (also a textArea)
    The problem is when after modify the information with the editor I call fireEditingStopped(); and it doesn't return to the render it remains in editor so I can modify the text and when I change of cell It returns to the text put by the editor. I need that the user can't change the text showed in the textArea only be modified through the Dialog.
    In the next code I isolated the problem, so the Editor change the original text with "NEW VALUE" simulating the action of Dialog (which is not included).
    Thanks a lot and thanks for the patience for my bad English.
    public class TableWithTextArea extends javax.swing.JFrame {
        public TableWithTextArea() {
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            getContentPane().setLayout(new java.awt.FlowLayout());
            this.getContentPane().add(new MyTabla());
            pack();
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new TableWithTextArea().setVisible(true);
        class MyTabla extends javax.swing.JTable {
            public MyTabla() {
                this.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);
                this.setModel(new javax.swing.table.DefaultTableModel(
                        new Object [][] {
                            {"A HOLA MUNDO", "B HOLA MUNDO", "C HOLA MUNDO", "D HOLA MUNDO"},
                            {"E HOLA MUNDO", "F HOLA MUNDO", "G HOLA MUNDO", "H HOLA MUNDO"},
                            {"I HOLA MUNDO", "J HOLA MUNDO", "K HOLA MUNDO", "L HOLA MUNDO"},
                            {"M HOLA MUNDO", "N HOLA MUNDO", "O HOLA MUNDO", "P HOLA MUNDO"}
                        new String [] {
                            "Title 1", "Title 2", "Title 3", "Title 4"
            public javax.swing.table.TableCellEditor getCellEditor(int row, int column) {
                    return new StringEditor(this);
            //CLASS StringEditor
            class StringEditor extends javax.swing.AbstractCellEditor
                                     implements javax.swing.table.TableCellEditor {
                private final static long serialVersionUID = 10092;
                javax.swing.JTable tabla;
                javax.swing.JTextArea editTextArea;
                String theValue = "";
                public StringEditor(MyTabla tabla) {
                    super();
                    this.tabla = tabla;
                    editTextArea = new javax.swing.JTextArea();
                    editTextArea.setLineWrap(true);
                    editTextArea.setWrapStyleWord(true);
                    editTextArea.setAutoscrolls(true);
                @Override
                public Object getCellEditorValue() {
                    return theValue;
                @Override
                public java.awt.Component getTableCellEditorComponent(javax.swing.JTable table, Object value, boolean isSelected, int row, int column) {
                    editTextArea.setLineWrap(true);
                    theValue = "NEW VALUE";
                    editTextArea.setText(this.theValue);
                    fireEditingStopped(); //IT'S NOT WORKING
                    return editTextArea;
    }

    Thanks a lot.
    It does just what I need, I read it before but I thought that it wasn't the solution to my problem.
    I'll study your code to understand what I did wrong.

  • Problem with comboBox editor

    Hi experts,
    i am keeping a combobox renderer and editor in my JTable for 2 columns say 5th column and 7th column.
    In renderer no Problem.
    But while i am editing ,whenever i am choosing a perticular item from the drop down in the first row of table,it is affecting the remaining set of rows.,not all the rows also.
    for example,next 5 rows are getting the same selected value.
    next some 2 rows are getting affected.
    the below 2 class are my renderer and editor.public class ComboBoxRenderer extends JComboBox implements TableCellRenderer {
            public ComboBoxRenderer(String[] items) {
                            super(items);
            public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
                    if (isSelected) {
                    // Select the current value
                    setSelectedItem(value);
                    return this;
    }My ComboBox editor is public class ComboBoxEditor extends DefaultCellEditor {
            public ComboBoxEditor(String[] items) {
                   super(new JComboBox(items));
    }so i am using this render and editor in my swing screen by the following codeString strSP[] = {"P", "O", "H", " "};
    column5.setCellEditor(new ComboBoxEditor(strSP));
    column5.setCellRenderer(new ComboBoxRenderer(strSP));I am sure like the problem with my renderer and editoronly,but i am helpless.
    Please if someone help me to come out of this problem,it will be much helpful for me .
    thanks

    Hi,
    Thanks for u'r reply
    I tried in so many ways.
    I tried with u'r editor,and sun forum examples also.
    I brief what i want.
    I am having table with 3 column.
    The zeroth col, and the 2 col is a combo box.so i am rendering.
    when i choose a one from zeroth col combo Box ,the 2nd col ComboBox value has to change into YES
    when i choose a apart from one from zeroth col combo Box ,the 2nd col combo Box value has to change into NO.
    Here my Problem is
    When ever i am choosing the particular value from the 1st combo box,it is affecting the all the combobox values below(set of values,not all)..To solve that i kept the commented line in the renderer but it is creating the new problem.
    I am very seriously working to solve this problem,if any one suggest to solve this,it will be very much helpful to me.
    I am posting my code belowimport java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.TableModelEvent;
    import javax.swing.event.TableModelListener;
    import javax.swing.table.*;
    public class TableComboBox extends JFrame implements TableModelListener
         public JTable table;
            DefaultTableModel model = null;
            JComboBox editor2 = null;
         public TableComboBox()
              Object[][] data = { {" ", "A" , " "}, {" ", "B", " "}, {" ", "C", " "}, {" ", "D", " "}, {" ", "E", " "}, {" ", "F", " "}, {" ", "G", " "}, {" ", "H", " "}  };
                    String[] columnNames = {"FIRST","SECOND", "THIRD" };
                    String[] column0Items = { "one", "two", "three", "four" };
                    String column2Items[] = {"YES","NO"};
              model = new DefaultTableModel(data, columnNames);
                    model.addTableModelListener(this);
              table = new JTable(model);
              //  Set the Zeroth column to use a combobox as its editor,renderer
                    table.getColumnModel().getColumn(0).setCellRenderer(new ComboBoxRenderer(column0Items));
              table.getColumnModel().getColumn(0).setCellEditor(new ComboBoxEditor(column0Items));
                    //  Set the second column to use a combobox as its editor,renderer
                    table.getColumnModel().getColumn(2).setCellRenderer(new ComboBoxRenderer(column2Items));
              table.getColumnModel().getColumn(2).setCellEditor(new ComboBoxEditor(column2Items));
                    JScrollPane scrollPane = new JScrollPane( table );
              getContentPane().add( scrollPane );
             public void tableChanged(TableModelEvent e) {
                    int row = e.getFirstRow();
                    int column = e.getColumn();
                    if(e.getType() == TableModelEvent.INSERT) {
                    if (e.getType() == TableModelEvent.UPDATE) {
                            if(table.getEditingRow() != table.getSelectedRow())
                                    ((DefaultCellEditor)table.getCellEditor()).cancelCellEditing();                      
                   if ( column == 0 ) {
                                    if(model.getValueAt(row, 0).equals("one")) {
                                            model.setValueAt("YES", row, 2);
                                    } else if(model.getValueAt(row, 0).equals("two")){
                                            model.setValueAt("NO", row, 2);
                                    } else if(model.getValueAt(row, 0) == "three"){
                                            model.setValueAt("NO", row, 2);
                                    } else if(model.getValueAt(row, 0) == "four"){
                                            model.setValueAt("NO", row, 2);
                           }else{
                                    //do nothing
         public static void main(String[] args)
              final TableComboBox frame = new TableComboBox();
              frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
              frame.pack();
              frame.setVisible(true);
            class ComboBoxRenderer extends JComboBox implements TableCellRenderer {
                    String items[];
                    public ComboBoxRenderer(String[] items) {
                                    super(items);
                                    this.items = items;
                    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
                                   if(isSelected){
                                            setSelectedItem(value.toString());
                                            return this;
                                    }/*else{
                                            setSelectedItem(items[0]));
                            return this;
            class ComboBoxEditor extends DefaultCellEditor {
                    public ComboBoxEditor(String[] items) {
                           super(new JComboBox(items));
            }

  • 870A Fuzion Power has problem with keyboard and mouse movement only in games.

    Hey guys,
    recently built a new system and chose to go with the 870A Fuzion Power mainboard, everything has gone very smoothly execpt for one problem, only when I play games like Crysis 2 ect the mouse seems to jolt around now and again and the keyboard decides to stop responding if I hold down the movement keys, and this is only in game not surfing the web for example. Now, I am using a wireless mouse and keyboard but I plugged in a PS/2 keyboard and the exact same thing happened. I've installed all of the drivers that came with this board and the drivers for the mouse and keyboard. Any of you guys ever had this sort of problem or know how to fix this?
    Thanks.

    I bought a new Macbook pro in june 2010, I didn't have any keyboard or mouse issues prior to upgrading to 10.6.4 supposedly this update was made to fix some issues with keyboard and mouse becoming unresponsive. For me the opposite happened. after the upgrade, my keyboard and mouse (trackpad) becomes sometimes partially unresponsive or totally unresponsive. the only way to solve the problem is by completely turning of the computer and turning back on.. granted it doesn't happen very often.. generally once every about 2-3 weeks but it is still annoying though..
    I didn't have a chance to use the computer too much on the previous version (10.6.3) so I don't know if it is software related or hardware related.. any thoughts?
    Message was edited by: msoued

  • Memory problem with JTextFields

    Hello,
    I have a wierd problem with JTextField and the memory.
    I need to fill a JPanel with different Components (including JTextFields), then do some calculation, remove the Components and filling the JPanel again.
    When i so this too often my i get an OutOfMemory Exception. I narrowed to problem down and wrote a small sample program to demonstrate the problem.
    When i call the method doIT (where the Panel is repeatedly filled) from the main-function everything works fine, but when it is called as a result from the GUI-Button-Event the memory for the JTextFields is not freed (even the call of the Garbage collector changes nothing)
    When i only use JButtons to fill the Panel everything works fine.
    Has anyone an idea why this problem occurs and how i can work around it?
    [Edit] I tested it whith java 1.5.0_06, 1.5.0_11, 1.6.0_02
    Thanks
    Marc
    import java.awt.Frame;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.lang.management.ManagementFactory;
    import java.lang.management.MemoryUsage;
    import javax.swing.JButton;
    import javax.swing.JDialog;
    import javax.swing.JPanel;
    import javax.swing.JTextField;
    public class MemoryTestDLG extends JDialog {
         public MemoryTestDLG(Frame owner) {
              // create Dialog with one Button that calls the testMethod
              super(owner);
              JButton b = new JButton("doIT ...");
              b.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent e) {
                        doIT();
                        setVisible(false);
              getContentPane().add(b);
              pack();
         public void doIT() {
              // Testmethod that fills a JPanel 20 times with Components and clears it
              // again
              JPanel p = new JPanel();
              long memUse1 = 0;
              long memUse2 = 0;
              long memUseTemp = 0;
              for (int count = 0; count < 20; count++) {
                   // Clear the panel
                   p.removeAll();
                   // Get memory usage before the task
                   Runtime.getRuntime().gc();
                   memUse1 = ManagementFactory.getMemoryMXBean().getHeapMemoryUsage()
                             .getUsed();
                   // Fill Panel with components
                   for (int i = 0; i < 200; i++) {
                        // The Buttons seem to be released without any problem
                        p.add(new JButton("test" + Math.random()));
                        // JTextFields are not released when used from the dialog.
                        p.add(new JTextField("test " + Math.random()));
                   // get memory usage after the task
                   Runtime.getRuntime().gc();
                   memUseTemp = memUse2;
                   memUse2 = ManagementFactory.getMemoryMXBean().getHeapMemoryUsage()
                             .getUsed();
                   // print Memory results
                   System.out.println("Memory Usage: " + f(memUse1) + "   ->"
                             + f(memUse2) + " [ Used:" + f(memUse2 - memUse1)
                             + " ] [ Freed: " + f(memUseTemp - memUse1) + "]");
         public String f(long m) // formats the output
              String s = "" + m;
              while (s.length() < 8)
                   s = " " + s;
              return s;
         public static void main(String[] args) {
              MemoryTestDLG d = new MemoryTestDLG(null);
              System.out
                        .println("------------------ Direct Call (all is OK) -------------------");
              d.doIT(); // Memory is freed with every call to JPanel.removeAll()
              System.out
                        .println("------------ Call from Dialog (memory is not freed) -------------");
              // The Memory keeps blocked
              d.setModal(true);
              d.setVisible(true);
              System.exit(0);
    }Message was edited by:
    marcvomorc

    Thank you for your answer,
    In this sample the programm does not run out of memory. But when you look at the output you see, that in the first run (direct call) the memory ist freed immediately when tha panel is cleared but in the second run (from the Button) the memory usage is getting bigger and bigger. Wenn you change the number of components to 2000 (4000)
    // Fill Panel with components
            for (int i = 0; i < 2000; i++) {
                // The Buttons seem to be released without any problem
    //... ...and use the default memory settings (69mb heap) the programm runns out of memory.
    I get the following output:
    ------------------ Direct Call (all is OK) -------------------
    Memory Usage:   445504   -> 8121016 [ Used: 7675512 ] [ Freed:  -445504]
    Memory Usage:   617352   -> 8114336 [ Used: 7496984 ] [ Freed:  7503664]
    Memory Usage:   810488   -> 8491768 [ Used: 7681280 ] [ Freed:  7303848]
    Memory Usage:   943704   -> 8114976 [ Used: 7171272 ] [ Freed:  7548064]
    Memory Usage:   836760   -> 8505072 [ Used: 7668312 ] [ Freed:  7278216]
    Memory Usage:   978352   -> 8114784 [ Used: 7136432 ] [ Freed:  7526720]
    Memory Usage:   835552   -> 8498288 [ Used: 7662736 ] [ Freed:  7279232]
    Memory Usage:   977096   -> 8114312 [ Used: 7137216 ] [ Freed:  7521192]
    Memory Usage:   835640   -> 8498376 [ Used: 7662736 ] [ Freed:  7278672]
    Memory Usage:   977296   -> 8115000 [ Used: 7137704 ] [ Freed:  7521080]
    Memory Usage:   835392   -> 8504872 [ Used: 7669480 ] [ Freed:  7279608]
    Memory Usage:   976968   -> 8115192 [ Used: 7138224 ] [ Freed:  7527904]
    Memory Usage:   836224   -> 8501624 [ Used: 7665400 ] [ Freed:  7278968]
    Memory Usage:   977840   -> 8115120 [ Used: 7137280 ] [ Freed:  7523784]
    Memory Usage:   835664   -> 8498256 [ Used: 7662592 ] [ Freed:  7279456]
    Memory Usage:   976856   -> 8114384 [ Used: 7137528 ] [ Freed:  7521400]
    Memory Usage:   835784   -> 8502848 [ Used: 7667064 ] [ Freed:  7278600]
    Memory Usage:   977360   -> 8114592 [ Used: 7137232 ] [ Freed:  7525488]
    Memory Usage:   835496   -> 8502720 [ Used: 7667224 ] [ Freed:  7279096]
    Memory Usage:   976440   -> 8115128 [ Used: 7138688 ] [ Freed:  7526280]
    ------------ Call from Dialog (memory is not freed) -------------
    Memory Usage:   866504   -> 8784320 [ Used: 7917816 ] [ Freed:  -866504]
    Memory Usage:  7480760   ->14631152 [ Used: 7150392 ] [ Freed:  1303560]
    Memory Usage: 14245264   ->22127104 [ Used: 7881840 ] [ Freed:   385888]
    Memory Usage: 19302896   ->27190744 [ Used: 7887848 ] [ Freed:  2824208]
    Memory Usage: 27190744   ->35073944 [ Used: 7883200 ] [ Freed:        0]
    Memory Usage: 31856624   ->39740176 [ Used: 7883552 ] [ Freed:  3217320]
    Memory Usage: 39740176   ->47623040 [ Used: 7882864 ] [ Freed:        0]
    Memory Usage: 44410480   ->52293864 [ Used: 7883384 ] [ Freed:  3212560]
    Memory Usage: 52293864   ->58569304 [ Used: 6275440 ] [ Freed:        0]
    Memory Usage: 58569304   ->64846400 [ Used: 6277096 ] [ Freed:        0]
    Exception occurred during event dispatching:
    java.lang.OutOfMemoryError: Java heap spacewhen I outcomment the adding of the JButtons the amount of freed memory is 0 in the second run. So my guess is, that there is a problem with freeing the memory for the JTextFields.
    Memory Usage:   447832   -> 6509960 [ Used: 6062128 ] [ Freed:  6332768]
    Memory Usage:   722776   -> 6785632 [ Used: 6062856 ] [ Freed:  5787184]
    ------------ Call from Dialog (memory is not freed) -------------
    Memory Usage:   468880   -> 6770240 [ Used: 6301360 ] [ Freed:  -468880]
    Memory Usage:  6770240   ->13016264 [ Used: 6246024 ] [ Freed:        0]
    Memory Usage: 13016264   ->19297080 [ Used: 6280816 ] [ Freed:        0]
    Memory Usage: 19297080   ->25570152 [ Used: 6273072 ] [ Freed:        0]
    Memory Usage: 25570152   ->31849160 [ Used: 6279008 ] [ Freed:        0]
    Memory Usage: 31849160   ->38124368 [ Used: 6275208 ] [ Freed:        0]
    Memory Usage: 38124368   ->44402072 [ Used: 6277704 ] [ Freed:        0]
    Memory Usage: 44402072   ->50677928 [ Used: 6275856 ] [ Freed:        0]
    Memory Usage: 50677928   ->56955880 [ Used: 6277952 ] [ Freed:        0]
    Memory Usage: 56955880   ->63232152 [ Used: 6276272 ] [ Freed:        0]
    Exception occurred during event dispatching:
    java.lang.OutOfMemoryError: Java heap spaceAdditionally the JPanel I am using is not displayed on the screen. It stays invisible the whole time, but i cannot work around that, because the calculation is depending on the values being in components on the JPanel)
    Marc

  • I use an iMac (27" 3.4) and have problems with the Magic Mouse. It does not use contact, but opens useless and unrelated submenus with every click, even on the empty desktop. I can't shift, open or close pages. Has anyone out there the same problem?

    I use an iMac 27" (mid 2011). Until recently I had OSX 10.6.8 installed, but both, the HDD and SSD had to be replaced, and I lost all the memory.
    After the repair through Apple Care I had OSX 10.7.5. (Lion) installed, which developed a Magic Mouse problem.
    Unlike with most users, I have no problems with connection, but grapple with a different kind of erratic behaviour.
    All fancy stuff is turned off in the mouse preferences. When I try to move, open or close pages, unrelated submenus pop up and hinder the
    required task. No matter how often I click, these menus stay there, and they even come up when clicking on the bare desktop.
    It renders the mouse absolutely useless, as no work can be done with it.
    The first 'Magic Mouse' had depleted batteries every few days, despite switching it off after use.
    I was supplied a new Mouse, which does better battery-wise, but the problems are the same. I can't get a result by clicking on any link, due to
    the pop-up menus, so both 'Magic Mice' are totally useless.
    At present I am using the old USB mouse from my Mac Pro, and that works still o.k.
    The problem are not the mice, but the software. The first 2 weeks after installation of OSX 10.7.5 the Magic Mouse worked though.
    I have no idea as to what the reason may be.
    Has anyone in the community ever experienced that particular problem. Any hint would be welcomed.
    Thank you!

    Not using any mouse pad, I have a very smooth desktop. But I just tried to use a sheet of A4 printing paper, but no result, the problem persisted.
    Someone on this forum suggested, that USB3 may interfere with the magic mouse.
    I have 2 LaCie HDD's about 70 cm away from the mouse, I use them on Thunderbolt. But in operation or not - the result is the same, the mouse plays up! Just now I was clicking the desktop and the mouse created a new folder!!
    Thanks for the advice, Bee
    Cheers, Gerd

  • Problem inserting a gif into a blob field in a table with sqldev / forms6i

    Problem solved - For those that might be interested, the errors don't make much sense - the problem was with the gif. Seems that these 28 gifs plus the new scans were saved from the scanner with
    GIF - LZW, Transparent color: 255
    Converting them to Black and white allowed them to be loaded.
    If anyone understands why, I'd like to know
    glenn
    I was previously having a problem deleting a row with a blob and it was suggested that I create the table using rowdependencies - which I did as follows.
    CREATE TABLE "MDD"."MDD_FIGURE2"
    (     "FG_FIGURENAME" VARCHAR2(18 BYTE),
         "FG_FIGURE" BLOB,
         CONSTRAINT "FG_FIGURENAME_NN" CHECK ("FG_FIGURENAME" IS NOT NULL) ENABLE
    ) ROWDEPENDENCIES;
    Then I copied my data from my previous table with the following - and everything came across
    INSERT INTO MDD_FIGURE2 (fg_figurename, fg_figure)
    SELECT FIG_FIGNAME, FIG_FIGURE FROM MDD_FIGURE;
    mdd_figure2 was then renamed to mdd_figure
    The table, Mdd_Figure, already contains some 2000+ .gifs that were successfully loaded with Forms 6i (yes, I know it is old, but I am stuck with having to use it). All the .gifs I am loading are from scans and all are less than 64k. However, 28 .gifs would not load. When I insert the .gif into the field and committed the form, the status message tells me a record was written but when I check it, the blob is empty.
    So, when I try to insert one of these problem .gifs in SqlDeveloper, I open the new mdd_figure table, select the blob field, open the edit dialog, set it to figure, select the .gif that I want to load and then save it. The blob field changes from NULL to BLOB, but it is empty. When I try to commit, I get the following error from SqlDev.
    UPDATE "MDD"."MDD_FIGURE" SET WHERE ROWID = 'AAAOeWAAEAAABAlAAz' AND ORA_ROWSCN = '358136842'
    One error saving changes to table "MDD"."MDD_FIGURE":
    Row 14: ORA-01410: invalid ROWID
    I use rollback to restore the record to it's previous state.
    If I load one of the successfully loaded .gifs into the same field, it loads perfectly as follows.
    UPDATE "MDD"."MDD_FIGURE" SET WHERE ROWID = 'AAAOeWAAEAAABAoAAp' AND ORA_ROWSCN = '358136522'
    Commit Successful
    It appears the 28 gifs have a problem. I've re-scanned them, with the same results. They are just small scanned line map images from our earlier publications. They view properly in several different graphics programs and I can't find anything wrong with them.
    I notice that the ROWID's are different while the ORA_ROWSCN's are the same - but what is the significance of that?
    Any suggestions as to what is happening and what I can do about it?
    Thanks for any help you can give me.
    glenn
    (Database is 10R2 and sqldev is the most recent one)
    Edited by: gconley on Sep 25, 2008 9:51 PM

    solved it myself - problem was with the gif

  • Problem importing a table with blob's

    hi all, I'm facing the following situation.
    Source DB : 10.2.0.3 (client's DB)
    Destination DB (mine): 10.2.0.4
    I've a dump file (traditional) of a particular schema.
    I'm running import (imp) to import on my DB.
    It runs fine until it reaches one particular table. This table has 6 colums, 3 of them are BLOB.
    This table has 260000 rows (checked with export log).
    When import reaches row 152352 it stops loading data, but import is still running.
    what can I do to get more information from this situation in order to solve this problem?
    Any suggestion will be appreciated!
    Thanks in advance.

    Pl identify the source and target OS versions. Are there any useful messages in the alert.log ? How long did the export take ? Rule of thumb states import will take twice as long. Have you tried expdp/impdp instead ? Also see the following -
    How To Diagnose And Troubleshoot Import Or Datapump Import Hung Scenarios          (Doc ID 795034.1)
    How To Find The Cause of a Hanging Import Session          (Doc ID 184842.1)
    Import is Slow or Hangs          (Doc ID 1037231.6)
    Export and Import of Table with LOB Columns (like CLOB and BLOB) has Slow Performance          (Doc ID 281461.1)
    HTH
    Srini

  • ORA-00600 problem when create XMLType table with registerd schema

    Hi,
    I am using Oracle9i Enterprise Edition Release 9.2.0.4.0 on RedHat Linux 7.2
    I found a problem when I create table with registered schema with follow content:
         <xs:element name="body">
              <xs:complexType>
                   <xs:sequence>
                   </xs:sequence>
                   <xs:attribute name="id" type="xs:ID"/>
                   <xs:attribute name="class" type="xs:NMTOKENS"/>
                   <xs:attribute name="style" type="xs:string"/>
              </xs:complexType>
         </xs:element>
         <xs:element name="body.content">
              <xs:complexType>
                   <xs:choice minOccurs="0" maxOccurs="unbounded">
                        <xs:element ref="p"/>
                        <xs:element ref="hl2"/>
                        <xs:element ref="nitf-table"/>
                        <xs:element ref="ol"/>
                   </xs:choice>
                   <xs:attribute name="id" type="xs:ID"/>
              </xs:complexType>
         </xs:element>
    Does Oracle not support element reference to other element with dot?
    For instance, body -> body.content
    Thanks for your attention.

    Sorry, amendment on the schema
         <xs:element name="body">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="body.head" minOccurs="0"/>
                        <xs:element ref="body.content" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element ref="body.end" minOccurs="0"/>
                   </xs:sequence>
                   <xs:attribute name="id" type="xs:ID"/>
                   <xs:attribute name="class" type="xs:NMTOKENS"/>
                   <xs:attribute name="style" type="xs:string"/>
              </xs:complexType>
         </xs:element>

  • Problem creating Allocation Table with Reference to a PO

    Dear Folks,
    I am having problems creating an allocation table with reference to a PO in T-code WA01.
    I read the SAP help that some prerequisites need to exist:
    ==> You can only reference order items flagged as being relevant to a stock split (the Allocation table relevant indicator in the additional item data).
    Can anyone advice me where to find this stock split indicator?
    Also, can anyone advice me how to reuse an allocation table? For example, I had previously created an allocation table with many articles and various allocation rules. I already generated follow on documents for this table.
    Say after 2 weeks, I have the similar requirements that I can make use of the same table, only with minor adjustments to the quantity. How do I create a new allocation table using the existing allocation table data?
    Thanks and Regards
    Junwen

    Any idea please?
    thanks

  • Problem with update of BLOB field in a table with compound primary key

    Hi,
    I've been developing an application in Application Express 3.1.2.00.02 that includes processing of BLOB data in one of the tables (ZPRAVA). Unfortunately, I've come across a strange behaviour when I tried to update value in a BLOB field for an existing record via a DML form process. Insert of a new record including the BLOB value is OK (the binary file uploads upon submiting the form without any problems). I haven't changed the DML process in any way. The form update process used to work perfectly before I'd included the BLOB field. Since than, I keep on getting this error when trying to update the BLOB field:
    ORA-20505: Error in DML: p_rowid=3, p_alt_rowid=ID, p_rowid2=CZ000001, p_alt_rowid2=PR_ID. ORA-01008: not all variables bound
    Unable to process row of table ZPRAVA.
    OK
    Some time ago, I've already created another application where I used similar form that operated on a BLOB field without problems. The only, but maybe very important, difference between both the cases is that the first sucessfull one is based on a table with a standard one-column primary key whereas the second (problematic one) uses a table with compound (composite) two-column PK (two varchar2 fields: ID, PR_ID).
    In both cases, I've followed this tutorial: [http://www.oracle.com/technology/obe/apex/apex31nf/apex31blob.htm]).
    Can anybody confirm my suspicion that Automatic Row Processing (DML) can be used for updating BLOB fields within tables with only single-column primary keys?
    Thanks in advance.
    Zdenek

    Is there a chance that the bug will be included in the next patch?No, this fix will be in the next full version, 3.2.
    Scott

  • Problem creating a table with a subquery and a dblink

    Hello!!
    I have a little problem. When I create a table with a subquery and a dblink, for example:
    CREATE TABLE EXAMPLE2 AS SELECT * FROM EXAMPLE1@DBLINK
    the table definition is changed. Fields with a type of CHAR or VARCHAR2 are created with a size three times bigger than the original table in the remote database. Field of type DATE and NUMBER are not changed. For example if the original table, in the database 1, has a field of type CHAR(1) it is create in the local database with a type of CHAR(3), and a VARCHAR2(5) field is created with VARCHAR2(15).
    Database 1 has a WE8DEC character set.
    Database 2 has a AL32UTF8 character set.
    Could it be related to the difference in character sets?
    What can I do to make Oracle use the same table definition when creating a table in this way?
    Thanks!!

    That is related to character sets, and probably necessary if you want all the data in the remote table to be able to fit in the new table.
    When you declare a column VARCHAR2(5), by default, you're allocating 5 bytes of storage. In a single-byte character set, which I believe WE8DEC is, that also happens to equate to 5 characters. In a multi-byte character set like AL32UTF8, though, 1 character may require up to 3 bytes of storage, so you'd need to allocate 15 bytes to store that data. That's what's going on here.
    You could still store all the data if you create the table locally by explicitly requesting 5 characters of storage by declaring the column VARCHAR2(5 CHAR). You could also set the NLS_LENGTH_SEMANTICS parameter to CHAR rather than BYTE before creating the table, but I believe that both of these will only apply when you're explicitly defining columns as part of your CREATE TABLE. I don't believe either will apply to CTAS statements.
    Justin

Maybe you are looking for