Solved

Need a MySql class template

Posted on 2009-05-18
9
189 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
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
 

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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

708 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now