Example #1
0
        private ArrayList GetProcData(MySqlConnection connection, string spName)
        {
            MySqlCommand mySqlCommand = new MySqlCommand(spName, connection);

            mySqlCommand.CommandType = (CommandType)4;
            StoredProcedure storedProcedure = new StoredProcedure(connection);

            return(storedProcedure.DiscoverParameters(spName));
        }
Example #2
0
        /// <summary>
        /// Retrieves parameter information from the stored procedure specified
        /// in the MySqlCommand and populates the Parameters collection of the
        /// specified MySqlCommand object.
        /// This method is not currently supported since stored procedures are
        /// not available in MySql.
        /// </summary>
        /// <param name="command">The MySqlCommand referencing the stored
        /// procedure from which the parameter information is to be derived.
        /// The derived parameters are added to the Parameters collection of the
        /// MySqlCommand.</param>
        /// <exception cref="InvalidOperationException">The command text is not
        /// a valid stored procedure name.</exception>
        public static void DeriveParameters(MySqlCommand command)
        {
            if (!command.Connection.driver.Version.isAtLeast(5, 0, 0))
            {
                throw new MySqlException("DeriveParameters is not supported on versions " +
                                         "prior to 5.0");
            }
            StoredProcedure sp = new StoredProcedure(command.Connection);

            sp.DiscoverParameters(command, "");
        }
Example #3
0
        public static void DeriveParameters(MySqlCommand command, bool useProc)
        {
            StoredProcedure sp = new StoredProcedure(command.Connection);

            sp.DiscoverParameters(command, useProc ? "PROCEDURE" : "FUNCTION");
        }