The Artima Developer Community
Sponsored Link

Java Buzz Forum
My first steps using MySql

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Ben Hosking

Posts: 208
Nickname: hoskinator
Registered: Apr, 2006

Ben Hosking is Java Developer with about 5 years experience and interest in OO
My first steps using MySql Posted: Dec 5, 2006 2:05 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Ben Hosking.
Original Post: My first steps using MySql
Feed Title: A Funny Java Flavoured Look at the World
Feed URL: http://jroller.com/hoskinator/feed/entries/rss
Feed Description: The blog looks at using Java and programming in general as it pops up in life as a Java programmer. It will have links to interesting Java articles and resources. It will also have a lot of SCJP Java 1.5 information and links as I am currently studying
Latest Java Buzz Posts
Latest Java Buzz Posts by Ben Hosking
Latest Posts From A Funny Java Flavoured Look at the World

Advertisement

I have been using MySQL this week which is my first foray into the MySQL world and I'm happy to say it has been a nice easy ride.  I haven't done anything fancy with it, in fact I have really only be using it to create two very basic tables but basically I needed a database and MySql is free so it was a good choice.



The download from the site was simple and after I downloaded the latest MySql I downloaded a nice gui tool to go with it - MySQL GUI Tools 5.0.  I have been using the Query browser or when I asked another developer which one of the exe's to use he said "the lightening bolt".  The lightening bolt was very straightforward to use and creating the table was fairly easy but unfortunately I couldn't add in any rows in the gui dynamically and had to add the rows in using INSERT statements.  I don't mind dabbling with an Insert statement but I always forget the syntax (single quotes, who would have thought), so if like me you need a bit of reminding check this link


http://xaprb.com/blog/2006/02/21/flexible-insert-and-update-in-mysql/



or you can look at my code



INSERT  into sites (ipaddress, sitename) values
('127.0.0.1', 'localhost');



I wrote some jdbc connection code for oracle, SqlServer, access and as we already have code to do such things I was thought I should add in another connection to fit it in with the rest of our code.



I found a couple of useful links to show me how to connect and the name of the driver, the first one was very useful





http://www.stardeveloper.com/articles/display.html?article=2003090401&page=1


You have to download the MySql jar file and put it in the classpath or import it into your eclipse project. So now I am up and running with my MySql database, a table with some rows in and a JDBC connection and it was all fairly painless. 

As Borat would say "HI FIIIIVEE"




If you like this blog or and fancy something a bit less technical with some laughing thrown in then check out my other blog
Amusing IT Stories. Which is a blog about funny and amusing stories from the IT environment and the office. It is a mix of news, office humour, IT stories, links, cartoons and anything that I find funny

Read: My first steps using MySql

Topic: What IT skills are used with Java? Previous Topic   Next Topic Topic: Men and Women differ on the perfect TV experience

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use