Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to install and configure sqlserver jdbc driver type 4

 
olabanji teebam
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please i really need help on how to install and configure sql server 2012 jdbc driver i have set my enviromental variables, i even set the classpath in the command prompt like this set CLASSPATH =.;C:\Users\T-BAM\Desktop\sqljdbc_4.0\enu\sqljdbc4.jar i tried to unzip it into my Program Files its giving an error message like could not create C:\Program Files\Microsoft SQL Server JDBC Driver\sqljdbc_4.0 - unzip operation cancelled i eventually created a folder in program files Microsoft SQL Server JDBC Driver and set the classpath like this set CLASSPATH =.; C:\Program Files\Microsoft SQL Server JDBC Driver\sqljdbc_4.0\enu\sqljdbc4.jar still not working or is anything wrong with my simple code which goes like this

Please i really need help on how to install and configure sql server 2012 jdbc driver i have set my enviromental variables, i even set the classpath in the command prompt like this set CLASSPATH =.;C:\Users\T-BAM\Desktop\sqljdbc_4.0\enu\sqljdbc4.jar i tried to unzip it into my Program Files its giving an error message like could not create C:\Program Files\Microsoft SQL Server JDBC Driver\sqljdbc_4.0 - unzip operation cancelled i eventually created a folder in program files Microsoft SQL Server JDBC Driver and set the classpath like this set CLASSPATH =.; C:\Program Files\Microsoft SQL Server JDBC Driver\sqljdbc_4.0\enu\sqljdbc4.jar still not working or is anything wrong with my simple code which goes like this


after clicking the jButton1 it throws an exception : Error occured
Error:java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
I have read various articles to help my self still not working, I will so much appreciate it if anyone can help me solve this problem that is giving me sleepless night

after clicking the jButton1 it throws an exception : Error occured
Error:java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
I have read various articles to help my self still not working, I will so much appreciate it if anyone can help me solve this problem that is giving me sleepless night
 
K. Tsang
Bartender
Posts: 3585
16
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From your post, you seem to have the jdbc jar in your classpath ok. How are you compiling your java class? In IDE or at command prompt?

If command prompt, you may want to use the -d flag. If IDE, make sure the jdbc jar is added to your project.

Another thing the connection string is somewhat wrong, should be:

The connection URL is jdbc:sqlserver://host:port;databaseName=db



Hope you change this will work.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic