Database connection

Hi, I have this simple program to access a database in Microsoft SQL Server 2000, the database that i am trying to access is Northwind.

But, when i execute the .jsp i get this error:

java.sql.SQLException: [Microsoft] database not found and no driver was specified.

at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)

at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)

at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(Unknown Source)

at sun.jdbc.odbc.JdbcOdbcConnection.initialize(Unknown Source)

at sun.jdbc.odbc.JdbcOdbcDriver.connect(Unknown Source)

at java.sql.DriverManager.getConnection(Unknown Source)

at java.sql.DriverManager.getConnection(Unknown Source)

at desisoft_jsp_ch16_01_jsp1179415463593._jspService(desisoft_jsp_ch16_01_jsp1179415463593.java:52)

at desisoft.server.JspBaseClass.service(JspBaseClass.java:48)

at desisoft.server.servlets.Servlet.service(Servlet.java:86)

what am I doing wrong?

thanks for any response...

the code:

ch16_01.jsp

<%@ page import="java.sql.*" %>

<% Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); %>

<HTML>

<HEAD>

<TITLE>Accessing the Publishers Database Table</TITLE>

</HEAD>

<BODY>

<H1>Accesando a la base de datos</H1>

<%

Connection connection = DriverManager.getConnection("jdbc:odbc:Northwind","p","p");

Statement statement = connection.createStatement() ;

ResultSet resultset = statement.executeQuery("select * from products") ;

%>

<TABLE BORDER="1">

<TR>

<TH>Name</TH>

</TR>

<%while(resultset.next()){ %>

<TR>

<TD>

<%= resultset.getString(1)%>

</TD>

</TR>

<%} %>

</TABLE>

</BODY>

</HTML>

[2232 byte] By [deroka] at [2007-11-27 4:43:47]
# 1
You want to access a SQL server by ODBC? Don't do that. Use the manfacturer's JDBC driver.Start here: http://www.google.com/search?q=sql+server+2000+jdbc+site:microsoft.com
BalusCa at 2007-7-12 9:55:36 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
ok, but if I would choose the ODBC,what would I have to change?
deroka at 2007-7-12 9:55:36 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
Have you got a SYSTEM DSN defined in the ODBC control panels for the server you are running this on?Does it test out ok?Can you create a database connection from standard java code?
evnafetsa at 2007-7-12 9:55:36 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...