"String or binary data would be truncated" error when creating job in eCapture Controller
Applies to: eCapture
Version: ALL


Symptom
When attempting to create a new job in eCapture, an error is returned: There was a problem creating the new ProcessJob: String or binary data would be truncated. The statement has been terminated. Please try the operation again.
Warnings
One or more of the below resolutions require knowledge of T-SQL and/or SQL Management Studio; consult a qualified SQL administrator for assistance with these procedures. Back up any targeted SQL databases before executing any SQL statements. Assisting with these procedures is outside the scope of normal Ipro application support.


Possible resolution 1
If this occurs on a job that was previously created, update the job name to less than 50 characters.
  1. In eCapture Controller, in the Client Management pane, locate the job. Note the job type and ID.
    Note: The ID can be found as indicated in the following image: 2017-08-03 13_07_10-eCapture Controller.png
  2. In SQL Management Studio, locate the appropriate eCapture client database. For more information see How to locate case/client databases for Eclipse, eCapture, Allegro.
  3. Edit the following SQL statement for the appropriate table and then execute it against the client database:

    Code:
    /* Edit TABLENAME / FIELDNAME dependent on the type of job to be altered:
    	Streaming Discovery/Discovery - DiscoveryJobs / DiscoveryJobId
    	Data Extract - DataExtractJobs / DataExtractJobId
    	Processing - ProcessJobs / ProcessJobId
    	Export - ExportJobs / ExportJobId */
    	
    	UPDATE TABLENAME
    	SET JobName = 'JOBNAME' --Replace JOBNAME with a job name of 50 characters or less
    	WHERE FIELDNAME = 'JOBID' --Replace JOBID with the ID noted in step 1
Possible resolution 2
Alter the field length for the JobName field in the appropriate table.

Warning: This option should only be used if there is a business reason why the job name cannot be altered to fit the normal character limit. This change will apply only to jobs for this client.
  1. Follow steps 1 and 2 from possible resolution 1 above.
  2. Edit the following SQL statement for the appropriate table and then execute it against the client database:

    Code:
    /* Edit TABLENAME / FIELDNAME dependent on the type of job to be altered:
    	Streaming Discovery/Discovery - DiscoveryJobs
    	Data Extract - DataExtractJobs
    	Processing - ProcessJobs
    	Export - ExportJobs
    	
    	ALTER TABLE TABLENAME
    	ALTER COLUMN FIELDNAME NVARCHAR(100)