activities
latest
false
Important :
Veuillez noter que ce contenu a été localisé en partie à l’aide de la traduction automatique.
Activités de développeur
Last updated 12 sept. 2024

Meilleures pratiques

Using a store procedure with OracleRefCursor

When using stored procedures in Oracle, ensure that the REF CURSOR is correctly bound with the Oracle.ManagedDataAccess.Types.OracleRefCursor variable.

To do so, you need to make sure the number of parameters and their type match the ones setup in the Parameters property of the Run Query activity.



You can get the content of the cursor using the Invoke Code activity or you can pass it to another database query as an input parameter. Here is a sample invoke code to convert it to a data table:

Oracle.ManagedDataAccess.Client.OracleDataReader reader2 = myRefCursor.GetDataReader();
                dt = new DataTable();
                dt.Load(reader2);Oracle.ManagedDataAccess.Client.OracleDataReader reader2 = myRefCursor.GetDataReader();
                dt = new DataTable();
                dt.Load(reader2);
You should dispose the cursor when you are done with it. You can do it either with Invoke Code activity (myRefCursor.Dispose), with Invoke Method activity from the System activity package or via an SQL command that you run.
  • Using a store procedure with OracleRefCursor

Cette page vous a-t-elle été utile ?

Obtenez l'aide dont vous avez besoin
Formation RPA - Cours d'automatisation
Forum de la communauté UiPath
Uipath Logo White
Confiance et sécurité
© 2005-2024 UiPath Tous droits réservés.