From ea4fc91303e6efe3fd430ed592828288fea937b0 Mon Sep 17 00:00:00 2001 From: Alexandru Petculescu Date: Tue, 3 Nov 2020 18:53:35 +0200 Subject: [PATCH] Bug #32 and #28 --- .../UiPath.Database/DatabaseConnection.cs | 25 ++++++++++++++++--- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/Activities/Database/UiPath.Database/DatabaseConnection.cs b/Activities/Database/UiPath.Database/DatabaseConnection.cs index 294a306c..088056ee 100644 --- a/Activities/Database/UiPath.Database/DatabaseConnection.cs +++ b/Activities/Database/UiPath.Database/DatabaseConnection.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Data; using System.Data.Common; +using System.Data.Odbc; using System.Text; using UiPath.Database.Properties; @@ -10,6 +11,7 @@ namespace UiPath.Database { public class DatabaseConnection : IDisposable { + private string OracleDriverPattern = "SQORA"; private DbConnection _connection; private DbCommand _command; private DbTransaction _transaction; @@ -111,13 +113,18 @@ private void SetupCommand(string sql, Dictionary 1) + return sql; + string pattern = "CALL {0} ({1})"; + string[] parameterString = new string[parametersCount]; + for (int i = 0; i < parametersCount; i++) + parameterString[i] = "?"; + return string.Format(pattern, sql, string.Join(",", parameterString)); + } private string GetColumnNames(DataTable table) {