009.01 Arlow JDBC Tutorial July 2005
009.01 Arlow JDBC Tutorial July 2005
DB URL
login password
optional
The object con gives us an open database
connection
© Clear View Training 2005 v1.3 13
Creating Statements
A Statement object is used to send SQL
statements to the DB
First we get a Statement object from
our DB connection con
Be careful to always put spaces in the SQL string at the right places!
concurrency = semantics
ResultSet.CONCUR_READ_ONLY
the ResultSet may not be
updated
ResultSet.CONCUR_UPDATABLE
the ResultSet may be
updated
rs.first();
rs.updateFloat("PRICE", 40.0F);
rs.updateRow();
rs.last();
rs.deleteRow();