title: unable to call stored procedre from jdbc
body: <p>below is my JDBC code for connecting to DB and call a stored porcedure.
  i have installed the sqljdbc4v in src folder onf my project and the class path is also set to my bin folder and src folder.</p>
  
  <pre><code>Connection con = null;
      CallableStatement proc_stmt = null;
      ResultSet rs = null;
  
      try {
  
          Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
  
          con = DriverManager.getConnection("jdbc:sqlserver://MYSERVER;databaseName=MYDATABASE", "USERID", "PASSWORD");
  
          proc_stmt = con.prepareCall("{ call generateID(?) }");
  
          proc_stmt.setString(1, "employee");
          rs = proc_stmt.executeQuery();
  
          if (rs.next()) {
              int employeeId = rs.getInt(1);
              System.out.println("Generated employeeId: " + employeeId);
          } else {
              System.out.println("Stored procedure couldn't generate new Id");
          }
      } catch (ClassNotFoundException ex) {
          ex.printStackTrace();
      } catch (SQLException ex) {
          ex.printStackTrace();
      } finally {
  
          try {
  
              rs.close();
              proc_stmt.close();
              con.close();
  
          } catch (SQLException ex) {
              ex.printStackTrace();
          }
  
      }
  </code></pre>
  
  <p>i keep on getting the below error</p>
  
  <pre><code>java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
      at java.net.URLClassLoader$1.run(Unknown Source)
      at java.net.URLClassLoader$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Unknown Source)
      at StoredProcedure1.main(StoredProcedure1.java:18)
  Exception in thread "main" java.lang.NullPointerException
      at StoredProcedure1.main(StoredProcedure1.java:41)
  </code></pre>
  
  <p>please help..</p>