tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Turner <rturner...@yahoo.co.uk>
Subject JSP JDBC MSSQL configuration
Date Tue, 04 Sep 2001 13:22:58 GMT
I am trying to connect to a MSSQL database withi a JSP
page and I am find documentation a little woolly.

Firstly I created a OBDC connection called 'Phone',
which I tested when I set it up and it said it was
successful. I also tried it out within an MS Access
database and again it worked fine, linking a SQL table
nicely.

My setup is that I am using IIS5 which has linked to
it a Tomcat 3.2.3 server. This set up seems to be
functioning correctly and the examples are running.

The code in my JSP file is as follows

[%@ page language="java" import="java.sql.*" %]
[%
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection
myConn=DriverManager.getConnection("jdbc:odbc:Phone");

Statement stmt=myConn.createStatement();
String query="SELECT * FROM Misc_Numbers ORDER BY
Description";

ResultSet rs=stmt.executeQuery(query);

The result I get in the browser is:

Error: 500

Location:/jsp/index.jsp

Internal Servlet Error:

Javax.servlet.ServletException: [Microsoft][ODBC
Driver Manager] Data source name not found
..................

Can anyone suggest what my problem is?

Robert T Turner
rturner003@yahoo.co.uk

____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

Mime
View raw message