com.microsoft.sqlserver.jdbc.SQLServerDriver not found error

前端 未结 8 1838
暖寄归人
暖寄归人 2021-02-13 14:56

I am trying to connect to my SQL Server 2008 database from Java and I\'m having the same problem from this thread.

String userName = \"xxxx\";
String password =          


        
8条回答
  •  孤街浪徒
    2021-02-13 15:29

    intellij idea 2019

    1. Download Microsoft JDBC Driver for SQL Server

    (https://docs.microsoft.com/en-us/sql/connect/jdbc/download-microsoft-jdbc-driver-for-sql-server?view=sql-server-2017)

    1. Unpack ("C:\opt\sqljdbc_7.2\enu\mssql-jdbc-7.2.2.jre11.jar")
    2. Add; (File->Project Structure->Global Libraries)
    3. Use; (Adding Jar files to IntellijIdea classpath (look video)) import com.microsoft.sqlserver.jdbc.SQLServerDriver; https://youtu.be/-2hjxoRKsyk

    or ub Gradle set "compile" compile group: 'com.microsoft.sqlserver', name: 'mssql-jdbc', version: '7.2.2.jre11'

提交回复
热议问题