| |

VerySource

 Forgot password?
 Register
Search
View: 706|Reply: 4

[S0S]: Help Java with SQL Server

[Copy link]

2

Threads

12

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

Post time: 2020-1-14 15:20:01
| Show all posts |Read mode
I load the driver like this:
Class.forName ("com.microsoft.jdbc.sqlserver.SQLServerDriver"). NewInstance ();

But when running, the error says: "java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver".

May I ask what is the reason? How to solve?
Reply

Use magic Report

0

Threads

39

Posts

23.00

Credits

Newbie

Rank: 1

Credits
23.00

 China

Post time: 2020-1-18 11:00:01
| Show all posts
MS SQL JDBC driver, did you put three files in the CLASSPATH?
Reply

Use magic Report

2

Threads

12

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

 Author| Post time: 2020-1-18 12:00:01
| Show all posts
Still need to set the classpath?
Which three files are they?
Reply

Use magic Report

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-19 12:00:02
| Show all posts
msbase.jar
mssqlserver.jar
msutil.jar
Reply

Use magic Report

2

Threads

12

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 Invalid IP Address

 Author| Post time: 2020-1-19 14:54:02
| Show all posts
Thank you! !! !!
I have downloaded a JDBC driver for SQL Server from the Internet. After installation, add three files to the CLASSPATH variable.
It's resolved now.
Thank you.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list