File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes using data base Access Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "using data base Access" Watch "using data base Access" New topic
Author

using data base Access

Kendra Payne
Greenhorn

Joined: Oct 17, 2006
Posts: 22
Hi,
I am new to Java and don't know much. I am trying to build a simple program to access my MS Access database. I am not sure how to put all of the components together. My ins gave us parts but I don't know what to do with them.

Any help is appreciated-thanks so much


[ February 04, 2007: Message edited by: Kendra Payne ]
[ February 04, 2007: Message edited by: Kendra Payne ]
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18874
    
  40

I am new to Java and don't know much. I am trying to build a simple program to access my MS Access database. I am not sure how to put all of the components together. My ins gave us parts but I don't know what to do with them.


Well, these are three different programs. The first will create a table, the second insert items into the table, and the third will select items from the table. These are more like example programs, than callable code. I guess you are suppose to use them as examples to create what you need.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Kendra Payne
Greenhorn

Joined: Oct 17, 2006
Posts: 22
Thanks!
Do you know you to change the names of the columns? I can get the table to create but when I change the names from say MyColumn1 to a title I would like to have, I get a syntax error when I run the application.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

Well, normally you would just use Access to open the database in design mode and change the column names there.

As for the syntax error, it would be more useful if you gave us a description of the error and also of the code that causes the error. Including the SQL statement that is the problem. You will appreciate that we can't tell much about your problem if we only know that you have a syntax error.

Edit: And normally you wouldn't even use a Java program to create your tables in the first place. You would just design them in Access. So don't pay any attention to that first program.
[ February 06, 2007: Message edited by: Paul Clapham ]
 
GeeCON Prague 2014
 
subject: using data base Access