• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

Question about "Java Cookbook: Solutions and Examples for Java Developers"

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does it have any solid examples of JDBC coding. I seem to be struggling with it at the moment.
 
tumbleweed
Posts: 5089
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to the index there is a whole chapter on Database Access
Good luck with your JDBC
[This message has been edited by Johannes de Jong (edited September 25, 2001).]
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
import java.sql.Connection;
import java.sql.Statement;
import java.sql.DriverManager;
import java.sql.ResultSet;
try
{
Class.forName("oracle.jdbc.driver.OracleDriver");
java.sql.Connection JDBCconnection= DriverManager.getConnection(DBConstants.DB_URL, DBConstants.DB_User, DBConstants.DB_Password);
}
Statement statement1=JDBCconnection.createStatement();
ResultSet rs=statement1.executeQuery("SQL QUERY")
rs.next();
 
Who among you feels worthy enough to be my best friend? Test 1 is to read this tiny ad:
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic