| | |
jdbc help?
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
•
•
Originally Posted by indianscorpion2
hi everyone,
i am looking for a brief introduction as to what exactly is jdbc and how do i install and use jdbc drivers with oracle 9i. and how shoud i write a code to execute queries on the tables in my oracle 9i database.
Please refer to Google.
•
•
Join Date: Jan 2006
Posts: 2
Reputation:
Solved Threads: 0
JDBC acts like bridge between your front-end (may be web-application,jsp,vb,form etc.,)and back-end(database). JDBC will talk to you db.
Choose appropriate jdbc drivers for Oracle9i. Ensure that jdbc drivers available in your machine through Settings/ControlPanel in Windows.
The simple code fragments:
Class.forName("sun.jdbc.odbc.JdbcOdbc");
Connection conn=DriverManager.getConnection(dsn,"username",pwd");
Statement st = conn.createStatement();
ResultSet rs = st.executeQuery("select * from x");
while(rs.next()){
System.out.println(rs.getString(1));
}
Choose appropriate jdbc drivers for Oracle9i. Ensure that jdbc drivers available in your machine through Settings/ControlPanel in Windows.
The simple code fragments:
Class.forName("sun.jdbc.odbc.JdbcOdbc");
Connection conn=DriverManager.getConnection(dsn,"username",pwd");
Statement st = conn.createStatement();
ResultSet rs = st.executeQuery("select * from x");
while(rs.next()){
System.out.println(rs.getString(1));
}
![]() |
Similar Threads
- JDBC for Access Database (Java)
- Can´t make JDBC connection to MS SQL from home? (MS SQL)
- Java JDBC ResultSet (Java)
- JDBC connection (Java)
- JDBC connection (Java)
Other Threads in the Java Forum
- Previous Thread: Question
- Next Thread: JavaScript Issue in Mozilla
| Thread Tools | Search this Thread |
Tag cloud for Java
addressbook android api apple applet application arguments array arrays automation binary bluetooth button calculator chat class classes client code columns component converter database draw eclipse error errors event exception file fractal ftp game givemetehcodez graphics gridlayout gui helpwithhomework html ide image inetaddress input integer j2me japplet java javaprojects jme jmf jni jpanel julia link linux list loop map method methods midlethttpconnection mobile netbeans newbie number objects openjavafx oracle php print problem program programming project projects recursion rim scanner screen server set signing size smart sms socket sort sql storm string support swing test threads time tree unlimited variablebinding webservices windows





