Solved

Need a MySql class template

Posted on 2009-05-18
9
203 Views
Last Modified: 2012-05-07
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
Comment
Question by:Mickeys
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 24410180
See the following and linked examples

http://www.exampledepot.com/egs/java.sql/ConnectMySql.html
0
 
LVL 26

Expert Comment

by:ksivananth
ID: 24410181
there are frameworks, try hibernate/ibatis!
0
 
LVL 92

Expert Comment

by:objects
ID: 24410182
commons dbutils has great helper methods

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

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Mickeys
ID: 24410533
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
 
LVL 92

Expert Comment

by:objects
ID: 24410565
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
 

Author Comment

by:Mickeys
ID: 24410653
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
 
LVL 92

Expert Comment

by:objects
ID: 24410666
thats the source distro, theres also a binary distrubution that contains jar


0
 

Author Comment

by:Mickeys
ID: 24410707
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
 
LVL 92

Accepted Solution

by:
objects earned 500 total points
ID: 24410734
0

Featured Post

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question