0

I have created a database using MS SQL named "Company" and there is a table named "Employee".

I need to print the records from the "Employee" table to a JTextArea keeping tabs for each columns in the JTextArea. How can i do it? Please help.

2
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by peter_budo
0

Why don't you use JTable?

OK, even if I use JTable how will I be able to get the data from MS SQL database to the table?

Using JTable is my second option to pursue with this exersice, but it would be great if you help me with my primary option. That is using JtextArea,

0

You need to connect to database and run query to get what ever data you need(general tutorial how to access database can be found here). Then format received data in such way so you can insert them in JTable (as per link in my first reply)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.