Mickeys
asked on
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?
there are frameworks, try hibernate/ibatis!
ASKER
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?
The other two....how does that work? I have to include some new package or what?
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.
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.
ASKER
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
thats the source distro, theres also a binary distrubution that contains jar
ASKER
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?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://www.exampledepot.com/egs/java.sql/ConnectMySql.html