Example #1
0
        public static DbResult GetXDataTable_R(String cnName, string sSql)
        {
            SqlBase db = NewDB(cnName);

            db.Connect();
            if (!db.IsConnected)
            {
                return(new DbResult(db));
            }
            DbResult dr = db.GetXDataTable_R(sSql);

            db.Close();
            return(dr);
        }
Example #2
0
        public static DbResult ExecuteGeneral_R(String cnName, CommandType cmdType, string sSql, object cmdParameters, CommandMode cmdMode)
        {
            SqlBase db = NewDB(cnName);

            db.Connect();
            object oR = null;

            if (db.IsConnected)
            {
                oR = db.ExecuteGeneral(cmdType, sSql, cmdParameters, cmdMode);
            }
            DbResult dr = new DbResult(db);

            db.Close();
            return(dr);
        }
Example #3
0
        public static DbResult Execute_R(String cnName, string sSql)
        {
            SqlBase db = NewDB(cnName);

            db.Connect();
            int iR = 0;

            if (!db.IsConnected)
            {
                iR = -1;
            }
            else
            {
                iR = db.Execute(sSql);
            }
            DbResult dr = new DbResult(db);

            dr.ReturnValue = iR;
            db.Close();
            return(dr);
        }