java吧 关注:1,234,749贴子:12,701,314
  • 0回复贴,共1

新手求问java连接sqlserver2012的语句

只看楼主收藏回复

在JSP页面写
Connection ct=DriverManager.getConnection("jdbc:microsoft:sqlserver://10.110.172.200:1433;databaseName=CTS_DB;administrator;123456");
为什么会报错
org.apache.jasper.JasperException: An exception occurred processing JSP page /Add.jsp at line 42
javax.servlet.ServletException: java.sql.SQLException: No suitable driver found for jdbc:microsoft:sqlserver://10.110.172.200:1433;databaseName=CTS_DB;administrator;XXZX_wlglorg.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:850)org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)org.apache.jsp.Add_jsp._jspService(Add_jsp.java:126)org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)javax.servlet.http.HttpServlet.service(HttpServlet.java:803)org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
求解,急


IP属地:湖南1楼2016-01-20 09:53回复