- From: Ragna-Lena&Dan <prepare.enrich@telia.com>
- Date: Sun, 20 Jun 1999 14:30:58 -0400 (EDT)
- To: "jigsaw <== dan" <www-jigsaw@w3.org>
Received on Sunday, 20 June 1999 15:22:29 UTC
On my machine I have MS Access97. When I fetch records from this DB using e.g. ColdFusion (www.allaire.com) and SQL, no problems at all. When I use a servlet I get "SQLException caught: [Microsoft][ODBC Driver Manager] Invalid cursor state" Why? Here is relevant code in the Test.java: Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); // Get a Connection to the database con = DriverManager.getConnection( "jdbc:odbc:SQL_DREAM"); // Create a Statement object stmt = con.createStatement(); // Execute an SQL query, get a ResultSet rs = stmt.executeQuery("SELECT PROCESSOR FROM ELVBERG_BOOKINGS WHERE ID = 1"); // Display the result set as a list out.println("<HTML><HEAD><TITLE>Test</TITLE></HEAD>"); out.println("<BODY>"); out.println(rs.getString("processor")); out.println("</BODY></HTML>"); -dan
Received on Sunday, 20 June 1999 15:22:29 UTC