• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Always TIMESTAMP?

 
Jim Yin
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,all
Suppose a column type is defined as DATE.
I found that when I can only identify this type as TIMESTAMP in my program.
I changed the DBMS from Oracle8i to MS SQL Server 2000, to MS ACCESS, and I get the seem result.
Can anybody give me an answer?
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch, Jim!
I'm not sure what you're asking exactly. Could you describe your question a bit more?
What do you mean by "I can only identify this type as TIMESTAMP in my program"? Are you getting SQLExceptions when running JDBC queries or updates using java.sql.Date?
 
Jim Yin
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In a database I created a table by:
create table xxx (id NUMBER(5), birthday DATE,...);
And I got some columns info using DatabaseMetaData.getColumns(...) method.
The returned data type of the 'birthday' column is always TIMESTAMP.
I changed the birthday's length/precision but had no effect.
I changed to other DBMS but got the seam result.
why?
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jim, I can't duplicate your experience with MySQL. The column data type returned using DatabaseMetaData.getColumns(...) is date, as expected.
Did you already resolve your problem? Perhaps if you were to post some more complete example code, somebody with access or knowledge of Oracle or SQL Server will take a look at this, and provide some feedback.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic