Beispiel #1
0
        static public string SqlString(string sSql)
        {
            string sResult = "";

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

            return(sResult);
        }
Beispiel #2
0
        static public int SqlInt(string sql, params object[] args)
        {
            AddArgsToQuery(false, ref sql, args);

            int nResult = 0;

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

            return(nResult);
        }