Skip to Content
0
Former Member
Feb 03, 2015 at 06:23 AM

java.sql.ResultSetMetaData.getColumnTypeName is giving null value for data type “timestamp” and “datetime”

120 Views

Hello,

I am working with Sybase IQ database. I have created a table as below:

CREATE TABLE SalesOrders2 (
FinancialCode CHAR(2),
CustomerID int,
History CLOB,
OrderDate TIMESTAMP,
ID BIGINT)

I am using the Java API to get column name and column type from this table.

PFA “TestSybaseConnection.txt” file for code reference. Below are the results that I am getting:

Column Name::FinancialCode----------------Column Type::char

Column Name::CustomerID----------------Column Type::int

Column Name::History----------------Column Type::CLOB

Column Name::OrderDate----------------Column Type::null

Column Name::ID----------------Column Type::bigint

For Orderdate I am getting null as data type but for other data type I am getting proper response. Same behavior present for data type “datetime” means for datetime I am getting “null” as column type.

Can you please check why I am getting this type of behavior as this should be supported.

Database Product Version: Sybase IQ/16.0.0.481/130503/P/sp01/MS/Windows 2003/64bit/2013-05-03 17:19:35

I am using “jconn4.jar” as database jdbc driver.

Attachments