File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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 Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "long data type" Watch "long data type" New topic
Author

long data type

padma patil
Ranch Hand

Joined: Nov 06, 2001
Posts: 41
Hi,
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.

thanks,
padmashree
I wanted to assign
Mahesh Mamani
Ranch Hand

Joined: Jun 25, 2001
Posts: 110
Hi,
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. http://java.sun.com/j2se/1.3/docs/api/java/sql/Timestamp.html

Thanks,
Hope It Helps

Mahesh
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: long data type