Ejemplo n.º 1
0
        /// <summary>
        /// Open a V-SQL query. Open is used with SELECT statements only.
        /// </summary>
        public void Open()
        {
            //Open SQL Query
            //Set rowsAffected
            //Fill 'columns' (meta data structure)

            if (queryID <= 0)
            {
                return;
            }

            int rowsaffected = 0;

            lock (syncRoot)
            {
                VistaDBAPI.ivsql_SetSQL(queryID, commandText);

                sqlID = VistaDBAPI.ivsql_Open(queryID, ref rowsaffected);

                InternalInitFieldDefs();

                recordCount = VistaDBAPI.ivsql_RecCount(queryID);

                rowsAffected = rowsaffected;

                opened = true;
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Open a V-SQL query. Open is used with SELECT statements only.
        /// </summary>
        public override void Open()
        {
            //Open SQL Query
            //Set rowsAffected
            //Fill 'columns' (meta data structure)

            if (this.queryID == 0)
            {
                return;
            }

            lock (syncRoot)
            {
                this.rowsAffected = 0;

                VistaDBAPI.ivsql_SetSQL(this.queryID, this.commandText);

                VistaDBAPI.ivsql_Open(this.queryID, ref this.rowsAffected);

                InternalInitFieldDefs();

                this.recordCount = VistaDBAPI.ivsql_RecCount(this.queryID);

                this.opened          = true;
                this.startTraversing = true;
            }
        }