The class runs fine when I omit s.executeUpdate(). I am unsure of what the problem might be. I am using Windows XP and connecting to an Access database. Thanks for your help.
Nick
package be314;
import java.sql.*;
public class Fordate1 {
public static void main (
String args []) {
try {
Class.forName(
"sun.jdbc.odbc.JdbcOdbcDriver");
Connection c = DriverManager.getConnection(
"jdbc
dbc:Music");
System.out.println("A success");
Statement s = c.createStatement();
s.executeUpdate (
"CREATE TABLE Customer (CustomerID INTEGER, Address VARCHAR
(25))");
ResultSet r =
s.executeQuery(
"SELECT Albums.Album FROM Albums WHERE Albums.Album)
Between 'A' And 'B')");
while(r.next()) {
System.out.println(
r.getString("Album"));
}
System.exit(0);
} catch (Exception) {
System.exit(0);
}
}
}