Beispiel #1
0
        /// <summary>
        /// 执行SQL语句,填充到指定的DataTable中,返回DataSet
        /// </summary>
        /// <param name="QueryString">SQL语句</param>
        /// <param name="strTable">DataTable的名称</param>
        /// <returns>DataSet数据集和</returns>
        ///
        public DataSet ExeForDst(String QueryString, OracleDataAdapter ad)
        {
            DataSet ds = new DataSet();

            cmd.CommandType = CommandType.Text;
            cmd.CommandText = QueryString;
            OracleCmdBuilder cb = new OracleCmdBuilder();

            //cb.SetDataAdapter(ad);
            return(ds);
        }
Beispiel #2
0
        public DataSet ExeForDst(String QueryString, OracleDataAdapter ad)
        {
            DataSet ds = new DataSet();

            //OracleDataAdapter ad = new OracleDataAdapter();
            ad.SelectCommand = cmd;
            cmd.CommandType  = CommandType.Text;
            cmd.CommandText  = QueryString;
            OracleCmdBuilder cb = new OracleCmdBuilder();

            cb.SetDataAdapter(ad);

            try
            {
                ad.SelectCommand = cmd;
                ad.Fill(ds);
            }
            catch (Exception e)
            {
                throw e;
            }
            return(ds);
        }