• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 231
  • Last Modified:

Need a MySql class template

I am looking for at template class that connects to a sql server and can get, store and update the database. Is there a template anyone know off?
0
Mickeys
Asked:
Mickeys
1 Solution
 
CEHJCommented:
See the following and linked examples

http://www.exampledepot.com/egs/java.sql/ConnectMySql.html
0
 
ksivananthCommented:
there are frameworks, try hibernate/ibatis!
0
 
objectsCommented:
commons dbutils has great helper methods

http://commons.apache.org/dbutils/

0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
MickeysAuthor Commented:
well the first link was how to connect to a sql server. But what about reading, writing an update?

The other two....how does that work? I have to include some new package or what?
0
 
objectsCommented:
dbutils provides utility methods that can take some of the repetitiveness out of jdbc coding.
there isn't really a template than you can use, not any that are worth using anyway. Most end up making your code more complicated than it needs to be.
0
 
MickeysAuthor Commented:
might be a stupied question but when I download the package I get commons-dbutils-1.2-src.....shouldnt I get some kind of package.jar??? I cant just add that folder. That will give error
0
 
objectsCommented:
thats the source distro, theres also a binary distrubution that contains jar


0
 
MickeysAuthor Commented:
aha. So all I do is download that package. Take out the xx.jar and add it to my project. Then I use the example code to make it work?
0
 
objectsCommented:
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now