Exemple #1
0
        public int DoQuery(string sql, params object[] values)
        {
            Open();
            Columns     = new List <string>();
            LastCommand = String.Format(base.Tags(sql), FixValues(values));

            RS.DoQuery(LastCommand);
            firstLine = true;
            fields    = RS.Fields;

            for (int i = 0; i < RS.Fields.Count; i++)
            {
                Columns.Add(RS.Fields.Item(i).Name.ToString().ToUpper());
            }

            return(RS.RecordCount);
        }
Exemple #2
0
        public bool Next()
        {
            if (firstLine)
            {
                firstLine = false;
            }
            else
            {
                RS.MoveNext();
            }

            if (RS.EoF)
            {
                return(false);
            }
            else
            {
                fields = RS.Fields;
                return(true);
            }
        }