SQL server , adding a new table (help!!!!)

hi all,

i have a problem with SQL server

before i was using ms access and jdbc odbc driver

now i wanted to switch to sql server.

in 'pubs' database (which is a sample database in SQL 2000, i created a new table same as the one i used in ms access. i registered it as a system DSN as well as user dsn. However it seems that my java file which was working fine with ms access , seems that can't find my new table. from the error messages thrown i can understand that loading jdbc odbc drivers is okay, even connection (i suppose) is established. But it throws

Error: 500

Location: /examples/servlet/gs

Internal Servlet Error:

javax.servlet.ServletException: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'board'

where board is the name of my new table in database pubs.

below are the related code snippets

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

con = DriverManager.getConnection("jdbc:odbc:me","xxx","yyy"); where me is the dsn name of pubs database

and my sql statement is as follows :

"select * from board where .....";

from the error message i see the problem is with the table "board"

can anyone help me urgently please

thanks in advance :)

[1310 byte] By [yilmazay] at [2007-9-26 2:35:36]
# 1

Try exactly this connection (to DSN "me") and this SQL command "select * from board where ....." form the QueryAnalyzer.

So you should see if it is the DSN or the query (table name misspelled?).

The Java code shouldn't be different. I often use the same code for different DBMS.

Hartmut at 2007-6-29 10:02:13 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 2
Is xxx the owner of the table? If you created the table logged in as sa, then the owner is dbo. Try "select * from dbo.board where ....".
LiljedahlPA at 2007-6-29 10:02:13 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...