Exemple #1
0
        /// <summary>
        /// private called from constructors
        /// </summary>
        /// <exception cref=" OleDbException">While making connection to the database if oledb
        /// error occurs then OleDbException is thrown</exception>
        /// <exception cref=" Exception ">If other than OleDb error occurs Exception is thrown</exception>
        private void construct()
        {
            this.check();

            try
            {
                this.connection_ = new OleDbConnection(connection_string);
                this.adapter_    = new OleDbDataAdapter();
                this.command_    = new OleDbCommand();
            }
            catch (OleDbException sex)
            {
                throw new Error(AdoNet.exception_report(sex));
            }
            catch (Exception se)               // anything else
            {
                throw new Error("AdoNet.construct()", se);
            }
        }
Exemple #2
0
 /// <summary>
 /// Constructor of SPimplementation class
 /// </summary>
 /// <param name="host">instance of AdoNet Class</param>
 /// <param name="name">name of the sp</param>
 public SPimplementation(AdoNet host, string name)
 {
     sp_name_      = name;
     host_         = host;
     this.command_ = new OleDbCommand();
 }