NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
jamesg
Joined: 14 Jul 2012 Posts: 1
|
Posted: Sat Jul 14, 2012 12:42 pm Post subject: Display data from a MS Access database |
|
|
Hey guys I'm doing a project for school and I'm wondering how you display data from an MS Access database in a JFrame. It's a list of animals or plants with different attributes in an access table and I want to be able to display all the values and I want to be able to do a search for a specific entry and display all it's information. I've searched everywhere and the only information I've found regarding displaying data in NetBeans from a database is populating a JTable which is not what I'm looking for. Keep in mind that I'm still in school so we haven't dealt with any "intricate" code.
I would really appreciate some help
cheers |
|
| Back to top |
|
 |
bolsover
Joined: 24 Jun 2010 Posts: 185
|
Posted: Sun Jul 15, 2012 3:58 pm Post subject: |
|
|
Using Access is actually a little more difficult (IMHO) that some other database - but that said, not too difficult.
Before you start attempting to get the data into a JFrame or JTable, the first thing you need to do is establish a connection to the database and make sure you can retrieve data into your Java program.
I've not tested any of this but this looks like a good primer:
http://www.codeproject.com/Articles/35018/Access-MS-Access-Databases-from-Java
Once you have learned how to connect to and retrieve data from the database, create a JFrame with a TextArea and get the retrieved data to display in the TextArea.
db |
|
| Back to top |
|
 |
seanh123
Joined: 25 Jul 2012 Posts: 1
|
Posted: Wed Jul 25, 2012 12:01 pm Post subject: lol |
|
|
| Hey "james" lol. ima show u this at school |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|