Brian Sandt
asked on
Getting error trying to connect to SQL Server using java
Trying to connect to a SQL Server database from our internal web portal.
This is what I'm getting:
An error occurred at line: 1,694 in the jsp file: /accountDetail.jsp
DriverManager cannot be resolved
1691: Class.forName("com.microso ft.sqlserv er.jdbc.SQ LServerDri ver");
1692:
1693: String connectionUrl = "jdbc:sqlserver://HNCIISDE V;" + "databaseName=WebPortal;us er=" + login + ";password=" + pass;
1694: con = DriverManager.getConnectio n(connecti onUrl);
1695: }
1696: catch(ClassNotFoundExcepti on cnfex)
1697: {
Any ideas what my developer is missing?
This is what I'm getting:
An error occurred at line: 1,694 in the jsp file: /accountDetail.jsp
DriverManager cannot be resolved
1691: Class.forName("com.microso
1692:
1693: String connectionUrl = "jdbc:sqlserver://HNCIISDE
1694: con = DriverManager.getConnectio
1695: }
1696: catch(ClassNotFoundExcepti
1697: {
Any ideas what my developer is missing?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
It looks like your environment does not have the JDBC driver for SQL Server installed. Can you please try installing it? https://msdn.microsoft.com/en-us/library/mt484311(v=sql.110).aspx
ASKER
The JDBC driver was installed.
Sending my developer the link for the connection string.
Sending my developer the link for the connection string.
ASKER
Developer was finally able to get it working.