-1

I am using sts and make project:

enter image description here

and refresh all. error message:

Could not resolve: com.microsoft.sqlserver:sqljdbc4:4.0

how to fix it?

James Z
  • 11,838
  • 10
  • 25
  • 41
Lunatic
  • 9
  • 1
  • 5

1 Answers1

3

Try changing the line to:

compile('com.microsoft.sqlserver:mssql-jdbc')

You probably found a reference from somebody's code where they are using a local repository. As of November 11, 2016, mssql-jdbc is in Maven central. Much nicer to work with. It would appear that the 4.x versions are no longer officially available. All reference links that I have are redirecting to their new JDBC homepage.

Version 4 is not in Maven central, so you'd have to obtain it and use it locally. Here are the SQL Server JDBC drivers in Maven Repo.

Brian
  • 4,646
  • 3
  • 16
  • 27