Example #1
0
        static public int Exec(string sSql)
        {
            int nResult = 0;

            using (QMsSql s = new QMsSql())
            {
                nResult = s.Execute(sSql);
            }

            return(nResult);
        }
Example #2
0
        static public string SqlString(string sSql)
        {
            string sResult = "";

            using (QMsSql s = new QMsSql())
            {
                s.Open(sSql);
                if (s.GetRow())
                {
                    sResult = s.GetString(0);
                }
            }

            return(sResult);
        }
Example #3
0
        static public int SqlInt(string sSql)
        {
            int nResult = 0;

            using (QMsSql s = new QMsSql())
            {
                s.Open(sSql);
                if (s.GetRow())
                {
                    nResult = s.GetInt(0);
                }
            }

            return(nResult);
        }
Example #4
0
        static public int SqlInt(bool useRawValues, string sql, params object[] args)
        {
            int nResult = 0;

            AddArgsToQuery(useRawValues, ref sql, args);

            using (QMsSql s = new QMsSql())
            {
                s.Open(sql);
                if (s.GetRow())
                {
                    nResult = s.GetInt(0);
                }
            }

            return(nResult);
        }