aspose file tools*
The moose likes JDBC and the fly likes java newbie - jdbc example. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "java newbie - jdbc example." Watch "java newbie - jdbc example." New topic
Author

java newbie - jdbc example.

Stefan Renemeister
Greenhorn

Joined: Sep 26, 2009
Posts: 13
Hi all,

first let me say hi, as a new member!

I have created a database (mysql), with a table containing 2 columns: id (primary key) en photo (blob). I like to show the photo's by a java application. I like to avoid using hibernate right now, just plain java to show the records.

Can you help me for an exhaustive example?

I have crawled the net, looked through a lot of java books, and searched this forum, but couldn't find a satisfying answer to my question.

Thank you very much in advance.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41885
    
  63
Welcome to JavaRanch.

For starters, you'll need the MYSQL JDBC driver. Googling that exact phrase will lead you to it. It that doesn't come with instructions, then there's always the Sun Java Tutorial: http://java.sun.com/docs/books/tutorial/jdbc/index.html


Ping & DNS - my free Android networking tools app
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38896
    
  23
You should find these links useful:
MySQL documentation page.
MySQL 5.1 installation page.
MySQL handbook. The installation instructions are in chapter 2. Chapter about connector-J.
You are reminded you must follow the instructions to the letter. You can probably put your connector .jar in a different directory from that suggested, but the tiniest spelling error in the CLASSPATH or other details will mean the whole thing fails to work
Fred Hamilton
Ranch Hand

Joined: May 13, 2009
Posts: 679
I found the following pages to be a useful supplement to the Sun Java tutorial. In particular, you can download a lot of sample code which I found helpful

http://java.sun.com/products/jdbc/reference/codesamples/index.html#1
Stefan Renemeister
Greenhorn

Joined: Sep 26, 2009
Posts: 13
Thank you all,

it took me a while to read most of your links, but especially sun's JDBC was really nice.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java newbie - jdbc example.