|
| 1 | +using System; |
| 2 | +using System.Data; |
| 3 | +using System.Data.Common; |
| 4 | +using System.Linq; |
| 5 | +using System.Reflection; |
| 6 | +using System.Security; |
| 7 | +using System.Text; |
1 | 8 | using GeneXus.Application; |
2 | 9 | using GeneXus.Cache; |
3 | 10 | using GeneXus.Utils; |
| 11 | +using GxClasses.Helpers; |
4 | 12 | using log4net; |
5 | 13 | using MySQLCommand = MySqlConnector.MySqlCommand; |
6 | | -using MySQLParameter = MySqlConnector.MySqlParameter; |
7 | 14 | using MySQLConnection = MySqlConnector.MySqlConnection; |
8 | | -using MySQLException = MySqlConnector.MySqlException; |
9 | | -using MySQLDbType = MySqlConnector.MySqlDbType; |
10 | 15 | using MySQLDataAdapter = MySqlConnector.MySqlDataAdapter; |
11 | | -using System.IO; |
12 | | -using GxClasses.Helpers; |
13 | | -using System.Reflection; |
14 | | -using System; |
15 | | -using System.Data; |
16 | | -using System.Data.Common; |
17 | | -using System.Text; |
18 | | -using System.Collections.Generic; |
19 | | -using System.Security; |
| 16 | +using MySQLDbType = MySqlConnector.MySqlDbType; |
| 17 | +using MySQLException = MySqlConnector.MySqlException; |
| 18 | +using MySQLParameter = MySqlConnector.MySqlParameter; |
20 | 19 |
|
21 | 20 | namespace GeneXus.Data |
22 | 21 | { |
23 | | - |
| 22 | + |
24 | 23 | public class GxMySqlConnector : GxDataRecord |
25 | 24 | { |
26 | 25 | static readonly ILog log = log4net.LogManager.GetLogger(typeof(GeneXus.Data.GxMySqlConnector)); |
@@ -49,27 +48,9 @@ public override GxAbstractConnectionWrapper GetConnection(bool showPrompt, strin |
49 | 48 | return new MySqlConnectorConnectionWrapper(m_connectionString, connectionCache, isolationLevel); |
50 | 49 | } |
51 | 50 |
|
52 | | - string convertToMySqlCall(string stmt, GxParameterCollection parameters) |
53 | | - { |
54 | | - if (parameters == null) |
55 | | - return ""; |
56 | | - string pname; |
57 | | - StringBuilder sBld = new StringBuilder(); |
58 | | - for (int i = 0; i < parameters.Count; i++) |
59 | | - { |
60 | | - if (i > 0) |
61 | | - sBld.Append(", "); |
62 | | - pname = "@" + parameters[i].ParameterName; |
63 | | - sBld.Append(pname); |
64 | | - parameters[i].ParameterName = pname; |
65 | | - } |
66 | | - return "CALL " + stmt + "(" + sBld.ToString() + ")"; |
67 | | - } |
68 | 51 | [SecuritySafeCritical] |
69 | 52 | public override IDbCommand GetCommand(IGxConnection con, string stmt, GxParameterCollection parameters, bool isCursor, bool forFirst, bool isRpc) |
70 | 53 | { |
71 | | - if (isRpc) |
72 | | - stmt = convertToMySqlCall(stmt, parameters); |
73 | 54 | MySQLCommand mysqlcmd = (MySQLCommand)base.GetCommand(con, stmt, parameters.Distinct()); |
74 | 55 | if (isCursor && !isRpc) |
75 | 56 | { |
|
0 commit comments