-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: what type should I use ? long Binary ??
PostPosted: Sun May 23, 2004 11:01 am 
Senior
Senior

Joined: Wed Dec 17, 2003 4:24 am
Posts: 188
Hi everyone:

I want to use MySQL as my Database.But I come across a problem. MySQL have some data types like
Code:
  "long text ,  long binary ,  long blob,smallint "
 



I know data type varchar is java String only. What java data type should I use according MySQL? For example : What is long binary in Java ? Is it Blob? Thks

_________________
You are not alone...


Top
 Profile  
 
 Post subject: help
PostPosted: Mon May 24, 2004 12:53 pm 
Senior
Senior

Joined: Wed Dec 17, 2003 4:24 am
Posts: 188
Any idea? : (

_________________
You are not alone...


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 24, 2004 1:37 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
It depends upon the JDBC types that MySQL maps those DB type to. To check this, obtain a jdbc connection and do the following connection.getMetaData().getTypeInfo() This will return you a ResultSet where each row describes a SQL type in the underlying database. One of the columns in this result set is named "DATA_TYPE", which is the same value as the type's java.sql.Types value


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.