コード例 #1
0
        private static void UpdateOutParametersValues(Stream stream, AceQLParameterCollection parameters)
        {
            //1) Build outParametersDict Dict of (paramerer names, values)
            OutParamBuilder             outParamBuilder   = new OutParamBuilder(stream);
            Dictionary <string, string> outParametersDict = outParamBuilder.GetvaluesPerParamName();

            //2) Scan  foreach AceQLParameterCollection parameters and modify value if parameter name is in outParametersDict
            foreach (AceQLParameter parameter in parameters)
            {
                string parameterName = parameter.ParameterName;

                if (outParametersDict.ContainsKey(parameterName))
                {
                    parameter.Value = outParametersDict[parameterName];
                }
            }
        }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AceQLCommand"/> class with the text of the query.
 /// </summary>
 /// <param name="cmdText">The text of the query.</param>
 /// <exception cref="System.ArgumentNullException">If cmdText is null.
 /// </exception>
 public AceQLCommand(string cmdText)
 {
     this.cmdText = cmdText ?? throw new ArgumentNullException("cmdText is null!");
     parameters   = new AceQLParameterCollection(cmdText);
 }