Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid cast of Time part of Timestamp dbType #1

Open
glassfox opened this issue Dec 22, 2012 · 0 comments
Open

Invalid cast of Time part of Timestamp dbType #1

glassfox opened this issue Dec 22, 2012 · 0 comments

Comments

@glassfox
Copy link

Invalid cast time part of Timestamp dbType, when trying to load Resultset via CDataCacheDBAdapter.loadData

For example:
table: tmp_table

id | modify_date (timestamp)
1 | 2012-12-22 19:13:10

query:
select id, modify_date from tmp_table

code:
CDataCacheContainer ds = CDataCacheDBAdapter.loadData(resultSet, null, null, new HashMap());
CDataRowSet rowSet = ds.getAll();
while(rowSet.next()){
timeStamp = rowSet.getTimestamp("modify_date"); //<---
}

expected result:
timeStamp contains date and time parts. like: "2012-12-22 19:13:10"

actual result:
timeStamp contains only date part. like: "2012-12-22 00:00:00"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant