public static string updateJob(string userID, string jobName, string data)
        {
            JobRecord job    = new JobRecord(data);
            JobRecord oldJob = (JobRecord)job.selectOb("WHERE Name = '" + job.name + "'");

            if (oldJob == null)
            {
                return("Error: Job Record not found");
            }
            else
            {
                job.updateOb();
            }
            return(job.serialize()); /// should include ID field.
        }
        public static string publishJob1(string userID, string jobName, string data)
        {
            JobRecord job = new JobRecord(data);


            job.active = true;
            job.type   = "ImageRegion";
            JobRecord oldjob = (JobRecord)job.selectOb("WHERE name='" + jobName + "'");

            if (oldjob != null)
            {
                return("Error: Job name, " + jobName + " already in use.");
            }
            else
            {
                job.insertOb();
            }
            return(job.serialize()); /// should include ID field.
        }
        public static string publishJob2(string userID, string jobName, string data)
        {
            JobRecord job = new JobRecord(data);


            job.active = true;
            job.type   = "ImageRegion";
            JobRecord oldjob = (JobRecord)job.selectOb("WHERE name='" + jobName + "'");

            if (oldjob != null)
            {
                job.ID = oldjob.ID;
                job.updateOb();
            }
            else
            {
                job.insertOb();
            }
            createTaskRecords(userID, job.ID);
            return(job.serialize()); /// should include ID field.
        }