How to add data table/collection in queue


#1

Gurus,

Does any one know how we can add data table or dictionary in bot queue using add queue item activity. I tried to find you tube video and knowledge base also but no help. Also tired my luck on existing topics in this forum but did not find any.

Whenever i tried to add data table to queue it gives error “could not determine JSON object type for type System.Data.DataTable”.

Also is there any way i can add whole excel tab as one single collection in queue.

Regards,
Varun


#2

Does anybody had similar situation where collection or data table needs to be part or queue item.

Thanks & Regards
Varun


#3

Usually each row is a separate transaction, so this is quite unusual. But if you have a valid reason there are options:

  1. Store file location instead.
  2. Serialize yourself. Import namespace Newtonsoft.Json, then use JsonConvert.SerializeObject(yourObject) to make it a string and store that. When getting object from queue use JsonConvert.DeserializeObject(Of DataTable)(queueItem.SpecificData(howyounamedit))

#4

Please check your ID has write permissions on the database.
also make sure your query has all accurate columns/row names before updating the data into data table.