tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Layman <randy.lay...@aswethink.com>
Subject RE: JSP JDBC MSSQL configuration
Date Tue, 04 Sep 2001 13:44:46 GMT

	This is a guess, but I believe that your ODBC source is set up as a
user ODBC, however IIS isn't running as your user.  You need to be on the
System DSN tab when you create the source.

	Also, if this is for anything more than a school assignment, you
probably want to drop the JDBC-ODBC bridge - its not thread safe and will
crash Tomcat in certain not hard to get cases.  You can find more
information about it in Sun's Bug Parade.

	Randy

> -----Original Message-----
> From: Robert Turner [mailto:rturner003@yahoo.co.uk]
> Sent: Tuesday, September 04, 2001 9:23 AM
> To: tomcat-user@jakarta.apache.org
> Subject: JSP JDBC MSSQL configuration
> 
> 
> 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