Question

Error:

we tried the below code for file conversion, after execution we get to see the below error message in script task.

please find the code below

//var fileId = new Guid(aspPage.CustomData["ReportFileId"].ToString());

var fileId=Get("fileId");

var userConnection=Get("UserConnection");   

           

var entitySchemaManager = userConnection.EntitySchemaManager;

var entitySchemaQuery = new EntitySchemaQuery(entitySchemaManager, "UsrCandidateEntryFile");

var fileDataColumnName = entitySchemaQuery.AddColumn("Data").Name;

var fileNameColumnName = entitySchemaQuery.AddColumn("Name").Name;

entitySchemaQuery.Filters.Add(entitySchemaQuery.CreateFilterWithParameters(FilterComparisonType.Equal,

    entitySchemaQuery.RootSchema.GetPrimaryColumnName(), fileId));

var collection = entitySchemaQuery.GetEntityCollection(userConnection);

var currentRow = collection[0];

var data = currentRow.GetBytesValue(fileDataColumnName) as byte[];

var base64 = Convert.ToBase64String(data);

Set("Base64String",base64);   

if (collection.Count == 0) {

    return true;

}

return true;

Like 0

Like

1 comments

Dear Sekhar,

Could you please provide the error message?

Anastasia

Show all comments