Advertisement
Guest User

Untitled

a guest
May 26th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. C:ToolsMicrosoft JDBC Driver 4.0 for SQL ServerJDBC-Sqlsqljdbc_40enusqljdbc.jar;
  2.  
  3. import java.sql.DriverManager
  4. import java.sql.Connection
  5.  
  6. object TestJDBCSqlConnect {
  7.  
  8. def main(args: Array[String]) {
  9. val driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  10.  
  11. try {
  12. // make the connection
  13. Class.forName(driver)
  14.  
  15. } catch {
  16. case e => e.printStackTrace
  17. }
  18.  
  19. }
  20.  
  21. scala -cp . TestJDBCSqlConnect
  22.  
  23. java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement