----- Original Message -----
Sent: Wednesday, September 19, 2001
3:56 PM
Subject: Pls Help-Jsp connection to
database
Hi all.
I am still struggling to connect my jsp page to
a access database.
I keep getting the error.
[2001/09/19 11:17:01] [Microsoft][ODBC Driver
Manager] Data source name not found and no default driver
specified
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data
source name not found and no default driver specified
at
sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6031)
at
sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6188)
at
sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:2458)
at
sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:320)
at
sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:163)
at
java.sql.DriverManager.getConnection(DriverManager.java:517)
at
java.sql.DriverManager.getConnection(DriverManager.java:177)
at
_jsp._test._test6._response__jsp._jspService(_response__jsp.java:33)
at
com.caucho.jsp.JavaPage.service(JavaPage.java:89)
at
com.caucho.jsp.JavaPage.subservice(JavaPage.java:83)
at
com.caucho.jsp.Page.service(Page.java:280)
at
com.caucho.jsp.QServlet.service(QServlet.java:161)
at
com.caucho.server.http.AbstractRequest.service(AbstractRequest.java:454)
at
com.caucho.server.http.AbstractRequest.service(AbstractRequest.java:397)
at
com.caucho.server.http.PageCache$Entry.service(PageCache.java:256)
at
com.caucho.server.http.PageCache.service(PageCache.java:105)
at
com.caucho.server.http.VirtualHost.service(VirtualHost.java:424)
at
com.caucho.server.http.Request.dispatch(Request.java:213)
at
com.caucho.server.http.RunnerRequest.handleRequest(RunnerRequest.java:313)
at
com.caucho.server.http.RunnerRequest.handleConnection(RunnerRequest.java:260)
at
com.caucho.server.TcpConnection.run(TcpConnection.java:142)
at
java.lang.Thread.run(Thread.java:484)
It seems as it doesnot see my data source that
I have made in the Control Panel(I have made both a user dsn and a system
dsn (but both doesn't work))
I am using resin 1.1.6 with iis as a
webserver
my jsp page looks like this
<%@page
import="java.sql.*"%>
<%Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");%>
<%
String data="jdbc:odbc:JSP";
Connection
connection=DriverManager.getConnection(data," ","
");
Statement statement
=connection.createStatement();
ResultSet
results=statement.executeQuery("Select * from
Names");
%>
<html>
<body>
<P> The results
are:
</P>
<UL>
<% while (results.next()) { %>
<LI><%=
results.getString(1)%></LI>
<% } %>>
</UL>
</html>
</body>
It looks as if it has a problem with the
getConnection part..
Ihave made an odbc data source..
Please Please help...
Thanking you all in advance..
Nadia