Invoke-sqlcmd - not working in powershell code

TerminatingError(Invoke-Sqlcmd): “Could not load file or assembly ‘Microsoft.SqlServer.BatchParser, Version=15.100.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91’ or one of its dependencies. The system cannot find the file specified.”

Getting above mentioned error while calling the powershell script using invoke powershell activity.

Same code is working fine in powershell ISE or cmd line…

Assuming → Bot will create new powershell session and execute the script as similiar to executing them in ISE editor. API and then DB call, and vice versa so many steps are involved…

so i have no choice to go with uipath sql activies.

Any better suggestions to overcome this ?

Try the behavior in a Windows-Legacy project and in a Windows/Cross-Platform project.
They are using different PowerShell versions.

Invoke-Sqlcmd - uses 64 bit… so added using sql connections to resolve it…
Uipath user 32 bit, so changed the script using sql connection string and other way around.
Thanks Marian Platonov

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.