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
How to insert TIME printer friendly version
next newest post | next oldest post
Author Messages
mexican
Private First Class

Gender: Male
Location: Mexico city
Registered: Sep 2008
Status: Offline
Posts: 12

Click here to see the profile for mexican Send email to mexican Send private message to mexican Find more posts by mexican Edit or delete this message Reply w/Quote
Posted Friday, September 26, 2008 @ 00:50:29  

Hi again, I have DB2 tables that contains fields of TIME type, but if I specify them as: Column.setType(Types.TIME) it displays me a Calendar instead of pure hours, is there a way to do this: insert into table (TIME_field) values(TIME(?),1 something like this: in pure java I do it this way: Insert into table(TIME_field) values(TIME('08:30')) but in quicktable the use of pointers is the only way. How can I achieve the same thing?
Admin
Board Owner

Gender: Unspecified
Location:
Registered: Jul 2003
Status: Offline
Posts: 9

Click here to see the profile for Admin Send email to Admin Send private message to Admin Find more posts by Admin Edit or delete this message Reply w/Quote
Posted Friday, September 26, 2008 @ 09:06:50  

you can use the sql Insert into table(TIME_field) values(TIME('?'))
and one of the below method to convert the Date object into String for viewing editing.

This can be done in three ways
1) column.setDateFormat("HH:mm") ; This will still show the calendar object.
or
2) Using ResultSetMap class, convert date to string for viewing and convert back string to date or string while saving. refer api.
or
3) Using column.setUserCellRenderer(CellComponent cc) & column.setUserCellEditor(CellComponent cc) set your own renderer/editor to handle this.

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