//判断表是否存在
        public static bool IsExist(string tablename, OracleConnection strconn)
        {
            String tableNameStr = "select count(*) from user_tables where table_name ='" + tablename.ToUpper() + "'";

            OracleCommand cmd = new OracleCommand(tableNameStr, strconn);
            int result =Convert.ToInt32(cmd.ExecuteScalar());
            if (result == 0)
            {
                return false;
            }
            else
            {
                return true;
            }
        }

posted on 2011-08-10 17:05  易成波  阅读(716)  评论(0编辑  收藏  举报