Exemple #1
0
        public static System.Xml.XmlReader GetXmlReader(String cnName, string sSql)
        {
            SqlBase db = NewDB(cnName);

            db.Connect();
            if (!db.IsConnected)
            {
                return(null);
            }
            System.Xml.XmlReader xr = db.GetXmlReader(sSql);
            db.Close();
            return(xr);
        }
Exemple #2
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);
        }
Exemple #3
0
        public static XDataTable GetXDataTable(String cnName, string sSql)
        {
            SqlBase db = NewDB(cnName);

            db.Connect();
            if (!db.IsConnected)
            {
                return(null);
            }
            XDataTable xdt = db.GetXDataTable(sSql);

            db.Close();
            return(xdt);
        }
Exemple #4
0
        public static DataSet GetDataSet(String cnName, string sSql)
        {
            SqlBase db = NewDB(cnName);

            db.Connect();
            if (!db.IsConnected)
            {
                return(null);
            }
            DataSet ds = db.GetDataSet(sSql);

            db.Close();
            return(ds);
        }
Exemple #5
0
        public static DbValues GetDatas(String cnName, string sSql)
        {
            SqlBase db = NewDB(cnName);

            db.Connect();
            if (!db.IsConnected)
            {
                return(null);
            }
            DbValues dvs = db.GetDatas(sSql);

            db.Close();
            return(dvs);
        }
Exemple #6
0
        public static bool IsHasRow(String cnName, string sSql)
        {
            SqlBase db = NewDB(cnName);

            db.Connect();
            if (!db.IsConnected)
            {
                return(false);
            }
            bool blnR = db.IsHasRow(sSql);

            db.Close();
            return(blnR);
        }
Exemple #7
0
        public static object GetDataReader(String cnName, string sSql)
        {
            SqlBase db = NewDB(cnName);

            db.Connect();
            if (!db.IsConnected)
            {
                return(-1);
            }
            object oR = db.GetDataReader(sSql);

            db.Close();
            return(oR);
        }
Exemple #8
0
        public static object ExecuteGeneral(String cnName, CommandType cmdType, string sSql, object cmdParameters, CommandMode cmdMode)
        {
            SqlBase db = NewDB(cnName);

            db.Connect();
            if (!db.IsConnected)
            {
                return(null);
            }
            object oR = db.ExecuteGeneral(cmdType, sSql, cmdParameters, cmdMode);

            db.Close();
            return(oR);
        }
Exemple #9
0
        public static int Execute(String cnName, string sSql)
        {
            SqlBase db = NewDB(cnName);

            db.Connect();
            if (!db.IsConnected)
            {
                return(-1);
            }
            int iR = db.Execute(sSql);

            db.Close();
            return(iR);
        }
Exemple #10
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);
        }
Exemple #11
0
        public int DeleteFiles(String cnName, string sSql)
        {
            SqlBase db = NewDB(cnName);

            db.Connect();
            if (!db.IsConnected)
            {
                return(-1);
            }
            if (ULCode.QDA.Debug.IS_FORM_CLIENT)
            {
                return(-1);
            }
            int iR = db.DeleteFiles(sSql);

            db.Close();
            return(iR);
        }
Exemple #12
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);
        }