This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes JDBC and the fly likes Inserting data into database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Inserting data into database" Watch "Inserting data into database" New topic
Author

Inserting data into database

Kunal Lakhani
Ranch Hand

Joined: Jun 05, 2010
Posts: 618
I am using HTML as a front end with java. My html form has two fields, Name, and Id. But, in database i have created 3 columns, Name,Id and Username. Username should have the concatenated value of Name,and Id. I have to concatenate them in java class. How to do that?

Suppose Name entered is 'ONE', and ID,'100', then username should be 'ONE100'. Will concat() of String class will work for this?


kunal
santosh dhulipala
Ranch Hand

Joined: Oct 21, 2010
Posts: 52
i am sorry i mis understood your question


Thanks & Regards
Santosh Kumar.D

santosh dhulipala
Ranch Hand

Joined: Oct 21, 2010
Posts: 52
where do you want to concatenate is it at Database while inserting into table or from database while inserting into html
Kunal Lakhani
Ranch Hand

Joined: Jun 05, 2010
Posts: 618
Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Inserting data into database
 
Similar Threads
page redirection problem
hibernate datatype confusion?
is it the correct mapping?
Newbie lost in JSP
how to make a method in database access class for login