aspose file tools*
The moose likes Servlets and the fly likes Need to store space and enter in database 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 » Java » Servlets
Bookmark "Need to store space and enter in database" Watch "Need to store space and enter in database" New topic
Author

Need to store space and enter in database

Ramesh Sengani
Ranch Hand

Joined: Nov 23, 2011
Posts: 36
Hi,

I am working in forum site where i need to enter space and enter in database . how i make that possible ? . example:- Same as www.coderanch.com
Piyush Mangal
Ranch Hand

Joined: Jan 22, 2007
Posts: 196
Unless and until you trim spaces yourself, database should store spaces and enter by default.
Ramesh Sengani
Ranch Hand

Joined: Nov 23, 2011
Posts: 36
I tried but it's not storing. Is that any charecter for space and enter ?
Piyush Mangal
Ranch Hand

Joined: Jan 22, 2007
Posts: 196
Are you sure there is no java script which is trimming the value? What do you get on server when you submit the form with spaces?
Bart Hofma
Greenhorn

Joined: Apr 27, 2012
Posts: 9
cant you just store the ASCII values?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

Space s are not different from any other character when it comes to strings and how databases store them. You don't need to to do anything special. if the spaces are being removed, then there is something in the code that doing it. You'll need to track down and find it.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need to store space and enter in database