JSP connection til ms Sql DB
Hvad er der galt her??<%@ page import="java.sql.*"%>
<html>
<head> <title> forbindelse til databasen</title> </head>
<body bgcolor="fffff">
<table border=1 align="center">
<tr>
<td>Navn </td>
<td>Adresse </td>
</tr>
<%
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
java.sql.Connection connection= java.sql.DriverManager.getConnection(
"jdbc:microsoft:sqlserver://10.70.1.29:1433;database=DPD");
java.sql.Statement statement=connection.createStatement();
java.sql.ResultSet columns=statement.executeQuery("select * from medarb");
while(columns.next()){
String navn= columns.getString("navn");
String adresse= columns.getString("adresse"); %>
<tr> <td> <%= navn %> </td>
<td> <%= adresse %> </td>
</tr>
<% } %>
</table>
</body>
</html>
får følgende fejl:
java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver
at com.caucho.util.DynamicClassLoader.loadClass(DynamicClassLoader.java:530)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at _prove__jsp._jspService(/prove.jsp:11)
at com.caucho.jsp.JavaPage.service(JavaPage.java:75)
at com.caucho.jsp.Page.subservice(Page.java:506)
at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:182)
at com.caucho.server.http.Invocation.service(Invocation.java:315)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:246)
at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:163)
at com.caucho.server.TcpConnection.run(TcpConnection.java:139)
at java.lang.Thread.run(Thread.java:534)