Results 1 to 2 of 2
  1. #1
    bikkerss is offline Member
    Join Date
    Dec 2009
    Rep Power

    Default storing jcheckbox value to database sqllite


    i'm trying to store a value from a jcheckbox to an sqllite database
    i have use the isselected option to save it, this works and the value is writen to the database.

    but i want also to go to the next and previouse record there for a use the isselected option with a database reader

    dbfile=new File("inforegistratie.db3");, true);
    ISqlJetTable sqltabel=db.getTable("table");
    db.beginTransaction(SqlJetTransactionMode.READ_ONL Y);


    but i get the following error (database type of the kolom is boolean)

    Exception in thread "AWT-EventQueue-0" java.lang.Error: java.lang.reflect.InvocationTargetException
    at org.jdesktop.application.ApplicationAction.actionF ailed(
    at org.jdesktop.application.ApplicationAction.noProxy ActionPerformed(
    at org.jdesktop.application.ApplicationAction.actionP erformed(
    at javax.swing.AbstractButton.fireActionPerformed(Abs
    at javax.swing.AbstractButton$Handler.actionPerformed (
    at javax.swing.DefaultButtonModel.fireActionPerformed (
    at javax.swing.DefaultButtonModel.setPressed(DefaultB
    at javax.swing.plaf.basic.BasicButtonListener.mouseRe leased(
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEven
    at java.awt.Component.processMouseEvent(Component.jav a:6263)
    at javax.swing.JComponent.processMouseEvent(JComponen
    at java.awt.Component.processEvent( 8)
    at java.awt.Container.processEvent( 1)
    at java.awt.Component.dispatchEventImpl(Component.jav a:4630)
    at java.awt.Container.dispatchEventImpl(Container.jav a:2099)
    at java.awt.Component.dispatchEvent( 60)
    at java.awt.LightweightDispatcher.retargetMouseEvent(
    at java.awt.LightweightDispatcher.processMouseEvent(C
    at java.awt.LightweightDispatcher.dispatchEvent(Conta
    at java.awt.Container.dispatchEventImpl(Container.jav a:2085)
    at java.awt.Window.dispatchEventImpl( )
    at java.awt.Component.dispatchEvent( 60)
    at java.awt.EventQueue.dispatchEvent( 599)
    at java.awt.EventDispatchThread.pumpOneEventForFilter s(
    at java.awt.EventDispatchThread.pumpEventsForFilter(E
    at java.awt.EventDispatchThread.pumpEventsForHierarch y(
    at java.awt.EventDispatchThread.pumpEvents(EventDispa
    at java.awt.EventDispatchThread.pumpEvents(EventDispa
    Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De
    at java.lang.reflect.Method.invoke(
    at org.jdesktop.application.ApplicationAction.noProxy ActionPerformed(
    ... 27 more
    Caused by: java.lang.NumberFormatException: For input string: "false"
    at java.lang.NumberFormatException.forInputString(Num
    at java.lang.Long.parseLong(
    at java.lang.Long.valueOf(
    at org.tmatesoft.sqljet.core.internal.SqlJetUtility.a toi64(
    at org.tmatesoft.sqljet.core.internal.vdbe.SqlJetVdbe Mem.intValue(
    at org.tmatesoft.sqljet.core.internal.table.SqlJetBtr eeTable.getInteger(
    at org.tmatesoft.sqljet.core.internal.table.SqlJetBtr eeDataTable.getInteger( 68)
    at org.tmatesoft.sqljet.core.internal.table.SqlJetCur sor$
    at org.tmatesoft.sqljet.core.table.SqlJetDb$6.runWith Lock(
    at org.tmatesoft.sqljet.core.table.SqlJetDb.runWithLo ck(
    at org.tmatesoft.sqljet.core.table.SqlJetDb.runTransa ction(
    at org.tmatesoft.sqljet.core.table.SqlJetDb.runReadTr ansaction(
    at org.tmatesoft.sqljet.core.internal.table.SqlJetCur sor.getBoolean

  2. #2
    bikkerss is offline Member
    Join Date
    Dec 2009
    Rep Power

Similar Threads

  1. How can I add JCheckBox to each row?
    By batya in forum AWT / Swing
    Replies: 1
    Last Post: 11-04-2009, 09:25 PM
  2. Storing video files in mysql database
    By mrvigneshmca in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 09-27-2009, 03:50 PM
  3. Storing image loaded in applet in mysql database
    By mrvigneshmca in forum Java Applets
    Replies: 1
    Last Post: 03-20-2009, 04:17 PM
  4. Replies: 10
    Last Post: 12-23-2008, 07:37 PM
  5. storing exel data to access database
    By sijokunnappilly in forum Advanced Java
    Replies: 1
    Last Post: 10-30-2008, 07:59 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts