Original Poster Posted November 20, 2012 Share Posted November 20, 2012 hi im trying to make a connection from java program to a mysql database .... how would I do this.... there are a few methods which i have brought up but im not sure which would be the best ? Link to comment Share on other sites More sharing options...
0 psyko_x Posted November 20, 2012 Share Posted November 20, 2012 use spring JDBC. there are many tutorials out there and it's easy to use here's the official documentation http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/jdbc.html Link to comment Share on other sites More sharing options...
0 LaP Posted November 20, 2012 Share Posted November 20, 2012 http://dev.mysql.com/downloads/connector/j/ http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html http://jdbc.postgresql.org/ Link to comment Share on other sites More sharing options...
0 Original Poster Posted November 20, 2012 Author Share Posted November 20, 2012 use spring JDBC. there are many tutorials out there and it's easy to use here's the official documentation http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/jdbc.html could you give me a simply walk through on install this on linux xD ? I am doing as it says but when i tried to compile it gave me seval thousand errors all to do with the new package? Link to comment Share on other sites More sharing options...
0 kjordan2001 Posted November 20, 2012 Share Posted November 20, 2012 could you give me a simply walk through on install this on linux xD ? I am doing as it says but when i tried to compile it gave me seval thousand errors all to do with the new package? You may want to look into using maven when having to pull in libraries like Spring with multiple dependencies. Here's the dependencies though (in the "This artifact depends on ..." section): http://mvnrepository.com/artifact/org.springframework/spring-jdbc/3.1.2.RELEASE Even simpler if you don't want to pull in spring to your project is just get the connector/j jar and use Java's built-in JDBC stuff. Spring's straight JDBC stuff doesn't buy you a whole lot except providing some mapping stuff to turn a ResultSet into an object saving you some boilerplate code. Link to comment Share on other sites More sharing options...
Question
Original Poster
hi im trying to make a connection from java program to a mysql database .... how would I do this.... there are a few methods which i have brought up but im not sure which would be the best ?
Link to comment
Share on other sites
4 answers to this question
Recommended Posts