Community Sites
Create your own community website and start earning today !
It's Free !
Forum
Resources
Mentors
Projects
Entrance Exams
Question Papers
Colleges
Courses
Universities
Schools
Make Money
Communities
Members
Bookmarks
Polls
Fresher Jobs
Funny Photos
B.Tech Projects
New Member FAQ
My Profile
Sign In
Register
AdSense Revenue
Active Members
Today
mayur tiwary
(30)
eldho
(20)
narendra
(15)
Last 7 Days
sunil
(2114)
Saagar
(1696)
satish
(1423)
more...
Awards & Gifts
Online Exams
Aptitude Questions
General Aptitude Tests
Medical Entrance
Engineering Entrance
Bank Tests
TOEFL & IELTS Questions
Fresher Jobs
Our fresher job section is exclusively for fresh graduates! Find jobs for freshers in major Indian cities including Bangalore, Chennai, Hyderabad, Pune or Kochi
Resources
Find educational articles, blogs, discussion threads and other resources.
Colleges
Find details about any college in India or search for courses.
A Basic JDBC Connectivity in java
Posted Date: 18 Dec 2007 Resource Type:
Articles/Knowledge Sharing
Category:
Computer & Technology
Posted By:
BHARATH
Member Level:
Gold
Rating:
Points
: 2
JDBC1.java
import java.sql.*;
import java.io.*;
public class Jdbc1
{
public static void main(String args[])
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection c = DriverManager.getConnection("jdbc:odbc:datasource");
Statement st = c.createStatement();
ResultSet rs = st.executeQuery("Select * from employees");
try{
while(rs.next())
{
System.out.println("id");
System.out.print(rs.getString("Department Name"));
System.out.println("employee Name: "+rs.getInt("id"));
}
}
catch(Exception e)
{
}
/*int i=st.executeUpdate("update pemp set salary=salary+100 where empno='e001'");*/
}
catch(Exception e)
{}
}
}
reply for this post if want more
Responses
No responses found. Be the first to respond and make money from
revenue sharing program
.
Feedbacks
Popular Tags
What are tags ?
Search Tags
Sign In
(No tags found.)
Post Feedback
This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must
Sign In
to post a response.
Next Resource:
ARTICLE ON J2ME( Java 2 Micro Edition)
Previous Resource:
Gandhi Most Searched On Internet
Return to Discussion Resource Index
Post New Resource
Category:
Computer & Technology
Post resources and
earn money
!
Related Resources
C Program -Progarm to initialise array of pointers to an array
Pipelining Concept
C program to understand the sizeof operator
IBM PC
Important Dates For Gate Examination
Watch TV Channels
Watch Asianet online
Kairali TV in Internet
Surya TV online
Amritha TV Channel
Contact Us
Editors
Privacy Policy
Terms Of Use
SpiderWorks Technologies Pvt Ltd. 2006 - 2007 All Rights Reserved.