Posted on 2003-11-10
I am trying to manage a MS Access database by using Java. I have written the database which includes two tables named as follows, and includes the fields, the root Access file is called Books:
Username Username Book Auther
I have written the java program to accept input such as: tok add Fishing Guide John Alan, where tok is the username, add a command.
Theses values are past to the add method, and it is here I need your advice. I wanted the add method to first check in the username table if tok already exists and if it does then to add the username, book tile and author name to the bookInfo table, creating a new record in this table. And if the username tok can not been found the first table (username) then the username will be added and also added to the bookInfo table, together with the book title and author. I would also like to know to to connect and disconnect from the database.
I hope you can understand my description.