예제 #1
0
        /// <summary>
        /// The FL_oledb_execute_command
        /// </summary>
        /// <param name="Constring">The Constring<see cref="string"/></param>
        /// <param name="SqlCommand">The SqlCommand<see cref="string"/></param>
        /// <returns>The <see cref="int"/></returns>
        public static int FL_oledb_execute_command(string Constring, string SqlCommand)
        {
            var r = 0;

            try
            {
                var connection = new OleDbConnection(Constring);
                var cmd        = new OleDbCommand(SqlCommand, connection);
                r = cmd.ExecuteCommand();
            }
            catch (OleDbException e)
            {
                MessageBox.Show("Error : " + e.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
            }
            return(r);
        }