wood burning stoves 2.0
The moose likes Beginning Java and the fly likes Appending records to a text area Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Appending records to a text area" Watch "Appending records to a text area" New topic

Appending records to a text area

Enock Banacson

Joined: Sep 30, 2003
Posts: 8
Can anyone throw some light
//My program display some silly results. I put the following statement:
"SELECT * FROM Reports WHERE DateOfPurch = '"+jtfDate.getText().trim()+"'";
//then tell it to append those results to a text area using the following:
int result = new StringBuffer();
ResultSetMetaData metaData = rst.getMetaData();
int numberOfColumns = metaData.getColumnCount();
for(int i = 1; i <= numberOfColumns; i++)
for(int i = 1; i <= numberOfColumns; i++)
//but after the third column it starts displaying data in an unordely manner i.e. leaving some unneccessary spaces.
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

Enock. Unfortunately your question does not deal with Servlets, which is the topic for this forum. I am going to move this to the Java Beginner's forum since you already have posted there, and this question will match the topic there.
Please refrain from posting into inappropriate forums. Also to let you know, there is a "CODE" tag that will keep your code formatted with indentation, etc,, that makes your code easier to read and therefore easier for us to help you. The "CODE" tag can be created by clicking on the CODE button below the Add Reply button when posting.
Thanks and good luck.

Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
William Barnes
Ranch Hand

Joined: Mar 16, 2001
Posts: 986

Please use *code* tags.
This is confusing me.

Do you mean to say this:

or this?

Please ignore post, I have no idea what I am talking about.
I agree. Here's the link: http://aspose.com/file-tools
subject: Appending records to a text area
It's not a secret anymore!