I am having trouble reading from an SQL Server database in a servlet. I get the following exception message:
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'Categories'.
The table exists and I can connect to it OK from an asp page. I usually use the following textbook code to connect to Access databases and have had no problems. Is there something else in JDBC that is required for SQL?
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"
Connection conn = DriverManager.getConnection("jdbcdbc:testdb"
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM Categories"
--Will Duty
wduty@radicalfringe.com
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'Categories'.
The table exists and I can connect to it OK from an asp page. I usually use the following textbook code to connect to Access databases and have had no problems. Is there something else in JDBC that is required for SQL?
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"
Connection conn = DriverManager.getConnection("jdbcdbc:testdb"
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM Categories"
--Will Duty
wduty@radicalfringe.com