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 > Column Post New Topic   Post A Reply
deplacing column timestam . requery = error printer friendly version
next newest post | next oldest post
Author Messages
infow
Unregistered
Edit or delete this message Reply w/Quote
Posted Tuesday, February 3, 2009 @ 09:46:35  

Hi,
i'm using version 2.0.5.28 with source and jdbc oracle (latest)
on the version 11 jdbc from oracle, i had to use timestamp.

when i moved column and requery, i have an error when i had moved a Timestamp column.
there's no error when i move another column type.

there's an error in the DbTableModel on fetch function:
if( rMap[j-1] != null )
rowVector.addElement( rMap[j-1].getObject(tableResultSet, j));
else if ( isTimeStamp[j-1] )
rowVector.addElement( tableResultSet.getTimestamp(j));
else
rowVector.addElement(tableResultSet.getObject(j));

when i repalce with
if( rMap[j-1] != null )
rowVector.addElement( rMap[j-1].getObject(tableResultSet, j));
else
rowVector.addElement(tableResultSet.getObject(j));

it's working.

the error is:
Skipping recreating columns. To refresh column properties everytime, use 'DBTable.useOldColumnProperties(boolean val)', if needed.
java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff]
at java.sql.Timestamp.valueOf(Unknown Source)
at oracle.jdbc.driver.CharCommonAccessor.getTimestamp(CharCommonAccessor.java:486)
at oracle.jdbc.driver.T4CVarcharAccessor.getTimestamp(T4CVarcharAccessor.java:897)
at oracle.jdbc.driver.OracleResultSetImpl.getTimestamp(OracleResultSetImpl.java:1060)
at org.apache.commons.dbcp.DelegatingResultSet.getTimestamp(DelegatingResultSet.java:211)
at quick.dbtable.DBTableModel.fetch(DBTableModel.java:2524)

What can i do ?
can i remove the getTimestamp and replace with getObject (it's working !)

thank in advance and have a nice day

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 Tuesday, February 3, 2009 @ 21:33:15  

This might be a bug.

Can you try the following change in source code and see whether it works?

DbTableModel
protected void fetch(int noOfRows) throws SQLException

change line
Column c = ((Column)dbColumnModel.getColumn(m));
to
Column c = ((Column)dbColumnModel.getColumnAsCreated(m));

Do not change anything with timestamp.

infow
Unregistered
Edit or delete this message Reply w/Quote
Posted Wednesday, February 4, 2009 @ 04:03:48  

hi and thank for the quick reponse !

it's working !

great work !

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 Wednesday, February 4, 2009 @ 09:42:01  

We will include this fix in our next release.
SUMsoft
Unregistered
Edit or delete this message Reply w/Quote
Posted Friday, August 14, 2009 @ 05:09:31  

Hi,

I'm using version 2.0.5.29 (Free Version) but still getting the same problem with moved Timestamp column.
Any suggestions?

Thanks!

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 Saturday, August 15, 2009 @ 02:59:03  

Before moving column, is timestamp working for you?
SUMsoft
Unregistered
Edit or delete this message Reply w/Quote
Posted Monday, August 17, 2009 @ 02:54:26  

Yes, it's showing correctly and sorting working also well. I'm getting problems only after the position of Timestamp column is changed.
SUMsoft
Unregistered
Edit or delete this message Reply w/Quote
Posted Wednesday, August 26, 2009 @ 13:38:10  

This is an Oracle JDBC 11.x driver problem, old 10.x driver working well.
Code:

java.sql.SQLException: Ungültiger Spaltentyp: getTimestamp not implemented for class oracle.jdbc.driver.T4CNumberAccessor
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:110)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:171)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227)
at oracle.jdbc.driver.Accessor.unimpl(Accessor.java:375)
at oracle.jdbc.driver.Accessor.getTimestamp(Accessor.java:808)
at oracle.jdbc.driver.OracleResultSetImpl.getTimestamp(OracleResultSetImpl.java:963)

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