?
Solved

Need a MySql class template

Posted on 2009-05-18
9
Medium Priority
?
220 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
Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

 

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 2000 total points
ID: 24410734
0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses
Course of the Month10 days, 4 hours left to enroll

762 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