Hello everyone,
Can't seem to get cached row sets to work from home (just school).
Heres the code, even though I'm sure the error is with mounting the
rowset.jar in the right place or something.
import java.io.*;
import java.sql.*;
import javax.sql.*;
import sun.jdbc.rowset.*;
public class jdbcEx4 extends java.lang.Object {
static String dbURLMS = "jdbc:inetdae:sqliti:1433";
static String user = "info470usr";
static String password = "jsp";
static String SQL = "Select * from t77_Vendor";
public jdbcEx4() {
}
public static void main (String args[]) throws ClassNotFoundException,
SQLException{
Class.forName("com.inet.Tds.TdsDriver");
Connection conn =
DriverManager.getConnection(dbURLMS,user,password);
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery(SQL);
CachedRowSet crs = new CachedRowSet();
crs.populate(rs);
rs.close();
conn.close();
System.out.println("Connection closed");
while(crs.next()){
System.out.println(crs.getInt(1) + " " + crs.getString("EMAIL")
);
This is the error when I execute:
Practice/SQLtoDisRS/jdbcEx4.java [12:1] Package javax.sql. not found in
import.
import javax.sql.*;
^
1 error
}
}
}
I have a rowset.jar put in my lib and lib/ext directories, but with no luck.
I am using Forte for Java CE, JDK 1.3 SE and SDK j2 SDK EE1.2.1.
Any advice would be extremely appreciated.
Thanks