This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JDBC and the fly likes infinite positions for column Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "infinite positions for column" Watch "infinite positions for column" New topic
Author

infinite positions for column

Candy Bortniker
Ranch Hand

Joined: Mar 17, 2003
Posts: 123
I have a textfield that is a scrollpane that allows for a description to be entered, this could have an infinite amount of characters. How would I set that up when I create the table to allow for any amount of characters? Or can I do that?
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Depends on the Database you are using. MySQL has a TEXT data type. It will probably be what you want to use. There are constraints on any data type in any database. Even if it just comes down to the allowed memory size of the table itself. Here is a list of data types and their storage limitations for MySQL. If you aren't using MySQL let me know and I will try and located info on your DB.


GenRocket - Experts at Building Test Data
Adrian Yan
Ranch Hand

Joined: Oct 02, 2000
Posts: 688
Actually, Candy, you need to set your requirement a little better. Your requirement should'nt say infinite, because the obviously no-one is gonna type in infinite amount of characters. You should set the description to whatever your database allow, and in your appliaction, check for the number of characters and give the user indication of amount allow.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: infinite positions for column