private Connection createNewConnection()
   {
      Connection myconn = null;
      try
      {
         try
         {
            Class<?> myclass = Class.forName(dbClassNm);
            if (myclass == null)
            {
               CDbError.logError(errfile, false, "Class loader did not return a class for " + dbClassNm, null);
               return(null);
            }
         }
         catch (ClassNotFoundException cex)
         {
            CDbError.logError(errfile, false, "Class loader did not return a class for " + dbClassNm, null);
            return(null);
         }
         Properties dbInfo = makeProps();
         if (dbUserName != null) dbInfo.setProperty("user", dbUserName);
         if (dbPassword != null) dbInfo.setProperty("password", dbPassword);

         myconn = DriverManager.getConnection(dbUrl, dbInfo);
         if (myconn == null)
         {
            CDbError.logError(errfile, false, "DriverManager did not return a connection: " + dbUrl, null);
            return(null);
         }

         if (!testConnection(myconn))
         {
            if (!myconn.isClosed()) myconn.close();
            CDbError.logError(errfile, false, "New connection failed test", null);
            return(null);
         }
      }
      catch (Exception e)
      {
         CDbError.logError(errfile, false, "Error making connection: ", e);
         return(null);
      }
      return(myconn);
   }