Click here to Skip to main content
15,902,938 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Help! In English is the use of a double negative... Pin
obermd30-Jun-20 4:24
obermd30-Jun-20 4:24 
RantJava, JDBC driver: Argh! Pin
raddevus29-Jun-20 11:29
mvaraddevus29-Jun-20 11:29 
GeneralRe: Java, JDBC driver: Argh! Pin
Sander Rossel29-Jun-20 11:42
professionalSander Rossel29-Jun-20 11:42 
GeneralRe: Java, JDBC driver: Argh! Pin
raddevus29-Jun-20 11:56
mvaraddevus29-Jun-20 11:56 
GeneralRe: Java, JDBC driver: Argh! Pin
Mycroft Holmes29-Jun-20 12:47
professionalMycroft Holmes29-Jun-20 12:47 
GeneralRe: Java, JDBC driver: Argh! Pin
kalberts29-Jun-20 12:49
kalberts29-Jun-20 12:49 
GeneralRe: Java, JDBC driver: Argh! Pin
raddevus29-Jun-20 18:05
mvaraddevus29-Jun-20 18:05 
GeneralRe: Java, JDBC driver: Argh! Pin
Jon McKee29-Jun-20 14:20
professionalJon McKee29-Jun-20 14:20 
Assuming the JAR is already added in your classpath, try adding Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); before the call to DriverManager.getConnection. I think that's still the full name of the SQL Server driver at least. Those are the two things that commonly cause this error.

EDIT:
Also if you're curious why javac doesn't seem to care, from what I understand it's because the SQLServerDriver class is never referenced in your code and therefore unnecessary for javac. DriverManager doesn't explicitly load driver classes, it just fetches them which is why you need to explicitly load the class via Class.forName.

modified 29-Jun-20 20:33pm.

GeneralRe: Java, JDBC driver: Argh! Pin
raddevus29-Jun-20 18:13
mvaraddevus29-Jun-20 18:13 
GeneralRe: Java, JDBC driver: Argh! Pin
Jon McKee29-Jun-20 20:35
professionalJon McKee29-Jun-20 20:35 
GeneralRe: Java, JDBC driver: Argh! Pin
raddevus30-Jun-20 2:03
mvaraddevus30-Jun-20 2:03 
GeneralRe: Java, JDBC driver: Argh! : tried it Pin
raddevus30-Jun-20 2:49
mvaraddevus30-Jun-20 2:49 
GeneralRe: Java, JDBC driver: Argh! Pin
raddevus30-Jun-20 3:05
mvaraddevus30-Jun-20 3:05 
NewsBad guys are not allowed to use iPhones Pin
ZurdoDev29-Jun-20 10:31
professionalZurdoDev29-Jun-20 10:31 
GeneralRe: Bad guys are not allowed to use iPhones Pin
Super Lloyd29-Jun-20 13:44
Super Lloyd29-Jun-20 13:44 
GeneralRe: Bad guys are not allowed to use iPhones Pin
DRHuff29-Jun-20 15:49
DRHuff29-Jun-20 15:49 
GeneralRe: Bad guys are not allowed to use iPhones Pin
Amarnath S29-Jun-20 18:48
professionalAmarnath S29-Jun-20 18:48 
GeneralRe: Bad guys are not allowed to use iPhones Pin
obermd30-Jun-20 4:25
obermd30-Jun-20 4:25 
GeneralThe mystery of the disappearing socks Pin
CodeWraith29-Jun-20 7:13
CodeWraith29-Jun-20 7:13 
GeneralRe: The mystery of the disappearing socks Pin
Sander Rossel29-Jun-20 8:22
professionalSander Rossel29-Jun-20 8:22 
GeneralRe: The mystery of the disappearing socks Pin
CodeWraith29-Jun-20 9:08
CodeWraith29-Jun-20 9:08 
GeneralRe: The mystery of the disappearing socks Pin
Sander Rossel29-Jun-20 11:34
professionalSander Rossel29-Jun-20 11:34 
GeneralRe: The mystery of the disappearing socks Pin
RickZeeland29-Jun-20 8:37
mveRickZeeland29-Jun-20 8:37 
GeneralRe: The mystery of the disappearing socks Pin
OriginalGriff29-Jun-20 9:43
mveOriginalGriff29-Jun-20 9:43 
GeneralRe: The mystery of the disappearing socks Pin
CodeWraith29-Jun-20 10:07
CodeWraith29-Jun-20 10:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.