File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes basic JDBC application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "basic JDBC application" Watch "basic JDBC application" New topic

basic JDBC application

Karan Raj

Joined: Jan 27, 2004
Posts: 16

i wanna develope applications, by which i can connect to databases and excute queries.Can anybody suggest me..the best way so that i can start developing applications quickly using JDBC...i am new to java...please help me.

Joe Ess

Joined: Oct 29, 2001
Posts: 9189

The Java Tutorial: JDBC Database Access

[How To Ask Questions On JavaRanch]
steve souza
Ranch Hand

Joined: Jun 26, 2002
Posts: 862
Download the WAR at to see examples of displaying dynamic data via jdbc. The live web demo is the same as the WAR you can download. - a fast, free open source performance tuning api.
JavaRanch Performance FAQ
Nikhilesh Gandhi

Joined: Feb 07, 2004
Posts: 8
use this code but first create a datasource using control panel /jdbcodbc
and select configure after selecting the required DB.
Create a table using the name in the coce or adjust to your requirements
import java.sql.*;
class temp

public static void main(String args[])
Connection conn;
Statement stat;
ResultSet rs;

conn = DriverManager.getConnection("jdbc dbc:Friend");
stat = conn.createStatement();
rs = conn.createStatement().executeQuery("select * from Friend");

System.out.println(rs.getString(1)+" "+rs.getString(2));
String Name="linus",Phone="6360073";

//String Query="insert into Friend values ('Mihir','455747')";
String Query="insert into Friend Values ('" +Name+ "','" +Phone+ "')";
catch(Exception e)
I agree. Here's the link:
subject: basic JDBC application
It's not a secret anymore!