Hey Dave,
Figured it out.  I stupidly didnt change the default DB to Northwind when
creating the DSN.  Thanks for the suggestion.

-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of David Nguyen
Sent: Tuesday, February 06, 2001 9:38 PM
To: [EMAIL PROTECTED]
Subject: Re: Does "Class.forName("sun.jdbc.odbc.JdbcOdbcDriver")" work
for SQL 7?


Hi,

Your JDBC code looks fine. I guess you are connected to another schema, not
the one containing Employees.
You may want to verify that when you created the ODBC data source for
"jdbc:odbc:Northwind" you did check "SQL Server authentification using login
ID and password entered by user" (instead of "WIndowNT authenfication using
network login ID").

You can also try to put your username in front of the table name in the SQL
query, for example:
..
String query = "SELECT * FROM sa.Employees";
...

In any case, create your own db account and try not to use account "sa".

david
-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of The Burkes
Sent: Tuesday, February 06, 2001 5:55 PM
To: [EMAIL PROTECTED]
Subject: Does "Class.forName("sun.jdbc.odbc.JdbcOdbcDriver")" work for
SQL 7?


Can someone shed some light on this JDBC issue for me?

I am using the default Northwind database in SQL Server 7.
I am using the dbo user with full access.

The problem is that when I run a query on the Employees table I get the
following error:

[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name
'Employees'

Code follows:
----------------------
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver")
String url = "jdbc:odbc:Northwind";
String user = "sa";
String pw = "";

con = DriverManager.getConnection(url,user,pw);
stmt = con.createStatement();
String query = "SELECT * FROM Employees";
rs = stmt.executeQuery( query );
----------------------

The code is right as far as I can tell.  I get no errors with the Connection
or Statement objects.

Is there some problem with using the jdbc:odbc bridge for SQL Server that I
dont know about?

Thanks,
Kyle Burke

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to