aspose file tools*
The moose likes JDBC and the fly likes long data type Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "long data type" Watch "long data type" New topic

long data type

padma patil
Ranch Hand

Joined: Nov 06, 2001
Posts: 41
I am generating unique id as
long id= System.currentTimeMillis();
I wanted to store this value into MySql table.
But Mysql doesn't support long datatype.
If I convert Long to int then it will truncate the extra part.
What shall I do? I need to generate unique id and add it to table.

I wanted to assign
Mahesh Mamani
Ranch Hand

Joined: Jun 25, 2001
Posts: 110
MySql has a Timestamp data-type which can be used for your purpose. U can use the Timestamp data-type in Java for this...
Use this URL for ref.

Hope It Helps

I agree. Here's the link:
subject: long data type
Similar Threads
Tomcat 5 _ Mysql 5
Hiding child element - IE works, but Mozilla no
Query on various properties wrt auto table generator
mapping One-to-many relationships using NetBeans and Not Hibernate
assighn table id