craftleft.gif (3002 bytes)QuickTable
Home | API | Tutorial | Download | Support | Contact topblack.gif (108 bytes)


QuickTable User Cp  |  Register  |  Members  |  Search  |  Help
    |- QuickTable Discussion Forums > JDBC/Database Issues Post New Topic   Post A Reply
unable to edit data in hsqldb printer friendly version
next newest post | next oldest post
Author Messages
jiantu{@}lehman.com
Unregistered
Edit or delete this message Reply w/Quote
Posted Wednesday, December 31, 1969 @ 23:59:59  

I connect DBTable to a table in a hsqldb database but I can not type anything to the cell. If I click on existing data cell it gets deleted.
I have checked that the Connection.isReadOnly=false.

What should I do to allow me to edit/insert data to such a table?
Thanks

admin{@}quicktable.org
Unregistered
Edit or delete this message Reply w/Quote
Posted Wednesday, December 31, 1969 @ 23:59:59  

By default editing happens based on the jdbc resultset metadata information. Sometimes the drivers don't give the correct meta data. In those cases, you may see this behaviour. Try setting column properties & then set editable to true


dBTable1.refresh();


//set the column properties for each column
Column c = dBTable1.getColumn(0);
c.setType(Types.NUMERIC);
c.setPrecision(7);


Column c = dBTable1.getColumn(1);
c.setType(Types.VARCHAR);
c.setLength(7);

..etc


//make all the columns to be editable
dBTable1.setEditable(true);

Ben

jiantu{@}lehman.com
Unregistered
Edit or delete this message Reply w/Quote
Posted Wednesday, December 31, 1969 @ 23:59:59  

Thanks Ben - it worked.
The JDBC from HSQLDB is not very good - I had to set length manually.
Post New Topic   Post A Reply Jump to:
Contact Us | QuickTable - A Java DBGrid | Privacy Policy All times are GMT -5 Hours.
Welcome to QuickTable Forums, Guest!  
Login
Username :
Password :
In order to fully utilize the abilities of this board, you are required to register as a member. Registration is free, and allows you to do lots of things including turning on or off certain features of this board. Register now!
Powered by CuteCast v2.0 BETA 2
Copyright © 2001-2003 ArtsCore Studios