You are viewing limited content. For full access, please sign in.

Question

Question

running SQL procedures in a Cloud system

asked on March 25, 2022

I'm trying to run a script in a workflow in Cloud to run a procedure in a SQL Server.  I already installed and configure the Laserfiche Worker and the remote agent.

I don't have much experience creating a script on C# or Phyton, does any have a sample that performs this activity so I can modify it to make work in our environment?

Appreciate any help, Thanks.

 

 

0 0

Replies

replied on March 25, 2022

Hi Pedro,

Do you specifically mean a SQL Stored Procedure rather than a normal SQL query/lookup?

If it's a lookup there should be no need to script it in C#/Python/etc. and you should use a Query rule with an external data source like so:

https://doc.laserfiche.com/laserfiche.documentation/en-us/Default.htm#../Subsystems/ProcessAutomation/Content/Resources/Rules/Data-Queries/Getting-Started-with-Data-Queries.htm

If you need to actually script a query, here's some links on doing so in C# to get you started:

  1. https://www.c-sharpcorner.com/article/execute-a-stored-procedure-programmatically/
  2. https://www.mssqltips.com/sqlservertip/5810/working-with-sql-server-stored-procedures-and-net/
  3. https://csharp-station.com/Tutorial/AdoDotNet/Lesson07
0 0
replied on March 27, 2022

Hi Samuel,

the procedure will perform several steps but the main one is to delete all the records on the table which can't be done using the Query rule at the moment (only search, insert, update are available).

 

I will take a look a the links that you sent me to check if I can perform the procedure.

 

 

0 0
replied on March 28, 2022

This was a limitation I ran into with Cloud as well. Not sure how to call methods that perform actions without stored procedures.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.