Skip to main content

Hi Team,

 

I wanted to pass DataTable as input parameter to C# DLL. I am unable to find Datatable parameter in the parameter type. Is it possible to pass Datatable as an input?

 

Is there a workaround to pass a datatable as parameter?

 

DLL Parameter

 

@anandc  check this article if it can help - https://www.c-sharpcorner.com/UploadFile/87b416/passing-datatable-to-storeprocedure-as-parameter-in-C-Sharp/


Thanks for sharing. This article mentions passing a list and then converting the list to Datatable. Can we directly pass datatable variable?


Hi @anandc ,

when i remember correct this is not possible just List and Dictionary.


Hi, 

It is supporting this data type only.
https://docs.automationanywhere.com/bundle/enterprise-v2019/page/enterprise-cloud/topics/aae-client/bot-creator/commands/cloud-run-dll.html

 


 There is one possible way. In Run Function you need to pass Datatable as Stringg,] as Input Parameter.



DLL Function arguments must be as below. and should return the multidimensional array.

 

you first need to convert this 2d array into datatable and after that perform required operation on that datatable and again convert it back to array.

it works.
reach out to me if you need help.


Reply