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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
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: 8836

The Java Tutorial: JDBC Database Access

"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
steve souza
Ranch Hand

Joined: Jun 26, 2002
Posts: 860
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
Similar Threads
JDBC driver
Who can give me a display data from database examples?
looking for job as freelancer
Problem with different oracle JDBC drivers
difference between sensitive and insensitive of resultset