Tengo una tabla así:
Código PHP:
CREATE TABLE "Articulos" (
ArticuloId INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL ,
Nombre VARCHAR NOT NULL ,
Precio INTEGER NOT NULL )
Cita:
Buscando en internet este error, sólo encontré que es un bug, pero el tema donde lo leí es de hace dos años, no creo que un bug así quede sin atender tanto tiempo.java.sql.SQLException: out of memory
at org.sqlite.DB.throwex(DB.java:288)
at org.sqlite.NativeDB.prepare(Native Method)
at org.sqlite.DB.prepare(DB.java:114)
at org.sqlite.Stmt.executeQuery(Stmt.java:89)
at probando.ModeloTabla.GuardaDatos(ModeloTabla.java: 69)
at probando.Probando.jButton4ActionPerformed(Probando .java:157)
at probando.Probando.access$000(Probando.java:17)
at probando.Probando$2.actionPerformed(Probando.java: 84)
at javax.swing.AbstractButton.fireActionPerformed(Abs tractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed (AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed (DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultB uttonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener$Actions .actionPerformed(BasicButtonListener.java:287)
at javax.swing.SwingUtilities.notifyAction(SwingUtili ties.java:1636)
at javax.swing.JComponent.processKeyBinding(JComponen t.java:2849)
at javax.swing.JComponent.processKeyBindings(JCompone nt.java:2884)
at javax.swing.JComponent.processKeyEvent(JComponent. java:2812)
at java.awt.Component.processEvent(Component.java:581 8)
at java.awt.Container.processEvent(Container.java:205 8)
at java.awt.Component.dispatchEventImpl(Component.jav a:4413)
at java.awt.Container.dispatchEventImpl(Container.jav a:2116)
at java.awt.Component.dispatchEvent(Component.java:42 43)
at java.awt.KeyboardFocusManager.redispatchEvent(Keyb oardFocusManager.java:1848)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEv ent(DefaultKeyboardFocusManager.java:697)
at java.awt.DefaultKeyboardFocusManager.preDispatchKe yEvent(DefaultKeyboardFocusManager.java:962)
at java.awt.DefaultKeyboardFocusManager.typeAheadAsse rtions(DefaultKeyboardFocusManager.java:834)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent (DefaultKeyboardFocusManager.java:661)
at java.awt.Component.dispatchEventImpl(Component.jav a:4285)
at java.awt.Container.dispatchEventImpl(Container.jav a:2116)
at java.awt.Window.dispatchEventImpl(Window.java:2440 )
at java.awt.Component.dispatchEvent(Component.java:42 43)
at java.awt.EventQueue.dispatchEvent(EventQueue.java: 599)
at java.awt.EventDispatchThread.pumpOneEventForFilter s(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(E ventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:121)
at org.sqlite.DB.throwex(DB.java:288)
at org.sqlite.NativeDB.prepare(Native Method)
at org.sqlite.DB.prepare(DB.java:114)
at org.sqlite.Stmt.executeQuery(Stmt.java:89)
at probando.ModeloTabla.GuardaDatos(ModeloTabla.java: 69)
at probando.Probando.jButton4ActionPerformed(Probando .java:157)
at probando.Probando.access$000(Probando.java:17)
at probando.Probando$2.actionPerformed(Probando.java: 84)
at javax.swing.AbstractButton.fireActionPerformed(Abs tractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed (AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed (DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultB uttonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener$Actions .actionPerformed(BasicButtonListener.java:287)
at javax.swing.SwingUtilities.notifyAction(SwingUtili ties.java:1636)
at javax.swing.JComponent.processKeyBinding(JComponen t.java:2849)
at javax.swing.JComponent.processKeyBindings(JCompone nt.java:2884)
at javax.swing.JComponent.processKeyEvent(JComponent. java:2812)
at java.awt.Component.processEvent(Component.java:581 8)
at java.awt.Container.processEvent(Container.java:205 8)
at java.awt.Component.dispatchEventImpl(Component.jav a:4413)
at java.awt.Container.dispatchEventImpl(Container.jav a:2116)
at java.awt.Component.dispatchEvent(Component.java:42 43)
at java.awt.KeyboardFocusManager.redispatchEvent(Keyb oardFocusManager.java:1848)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEv ent(DefaultKeyboardFocusManager.java:697)
at java.awt.DefaultKeyboardFocusManager.preDispatchKe yEvent(DefaultKeyboardFocusManager.java:962)
at java.awt.DefaultKeyboardFocusManager.typeAheadAsse rtions(DefaultKeyboardFocusManager.java:834)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent (DefaultKeyboardFocusManager.java:661)
at java.awt.Component.dispatchEventImpl(Component.jav a:4285)
at java.awt.Container.dispatchEventImpl(Container.jav a:2116)
at java.awt.Window.dispatchEventImpl(Window.java:2440 )
at java.awt.Component.dispatchEvent(Component.java:42 43)
at java.awt.EventQueue.dispatchEvent(EventQueue.java: 599)
at java.awt.EventDispatchThread.pumpOneEventForFilter s(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(E ventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:121)
Esta es mi sentencia en java para insertar el registro:
Código PHP:
String insercion;
insercion = "INSERT INTO Articulos VALUES (null, '"+nombre+"',"+precio+")";
inst.executeQuery(insercion);
¡Saludos y gracias!