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

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

            return(nResult);
        }
Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #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);
        }