Common Design for JDBC Connection
Posted by: shawn
Date: April 09, 2005 11:27PM

Preface: I'm extremely new at Java, so, I apologize for my ignorance...

I finally was able to connect to a MySQL database and run a little test query within some Java code. Yipee! I was wondering, however, if there was a way to have one class that could I call on to connect to the database each time I want to select, update, insert or delete. This would be instead of entering the database connection code for each downstream class with some sort of DML embedded in it.

For instance, in PHP I would have a simple database connect PHP file included into each one of my PHP files that needed to "hit" the database. Is there a similar approach I can take with Java?

I hope that makes sense.

Thanks!

Options: ReplyQuote


Subject
Written By
Posted
Common Design for JDBC Connection
April 09, 2005 11:27PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.