Ejemplo n.º 1
0
        public string LoadDatabases(string cn)
        {
            string dbName = "";

            try
            {
                Provider.VistaDB.VistaDBConnection conn = new Provider.VistaDB.VistaDBConnection(cn);
                conn.Open();
                dbName = conn.Database;
                conn.Close();

                try
                {
                    int index = dbName.LastIndexOfAny(new char[] { '\\' });
                    if (index >= 0)
                    {
                        dbName = dbName.Substring(index + 1);
                    }
                }
                catch {}
            }
            catch
            {
            }

            return(dbName);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Overloaded. Initializes a new instance of the VistaDBCommand class with a connection.
        /// </summary>
        public VistaDBCommand(string cmdText, VistaDBConnection connection)
        {
            InitClass();

            commandText     = cmdText;
            this.connection = connection;
        }
Ejemplo n.º 3
0
		internal VistaDBDataReader(int rowsAffected_)
		{
			this.rowsAffected      = rowsAffected_;

			this.opened            = false;
			this.rowCount          = 0;
			this.vistaDBConnection = null;
		}
Ejemplo n.º 4
0
		/// <summary>
		/// Overloaded. Initializes a new instance of the VistaDBCommand class with a connection.
		/// </summary>
		public VistaDBCommand(string cmdText, VistaDBConnection connection)
		{
			InitClass();

			commandText = cmdText;
			this.connection = connection;

		}
Ejemplo n.º 5
0
        internal VistaDBDataReader(int rowsAffected_)
        {
            this.rowsAffected = rowsAffected_;

            this.opened            = false;
            this.rowCount          = 0;
            this.vistaDBConnection = null;
        }
Ejemplo n.º 6
0
		/// <summary>
		/// Overloaded. Initializes a new instance of the VistaDBCommand class with a connection and transaction.
		/// </summary>
		public VistaDBCommand(string cmdText, VistaDBConnection connection, VistaDBTransaction txn)
		{
			InitClass();

			commandText = cmdText;
			this.connection = connection;
			vistaDBTransaction = txn;
		}
Ejemplo n.º 7
0
        /// <summary>
        /// Overloaded. Initializes a new instance of the VistaDBCommand class with a connection and transaction.
        /// </summary>
        public VistaDBCommand(string cmdText, VistaDBConnection connection, VistaDBTransaction txn)
        {
            InitClass();

            commandText        = cmdText;
            this.connection    = connection;
            vistaDBTransaction = txn;
        }
Ejemplo n.º 8
0
        internal VistaDBDataReader(VistaDBSQLQuery query, bool fillData, VistaDBConnection connection)
        {
            this.query             = query;
            this.vistaDBConnection = connection;
            this.rowsAffected      = this.query.RowsAffected;
            this.rowCount          = this.query.RecordCount;

            this.columns = new VistaDBColumnCollection(this);
        }
Ejemplo n.º 9
0
		internal VistaDBDataReader(VistaDBSQLQuery query, bool fillData, VistaDBConnection connection)
		{
			this.query             = query;
			this.vistaDBConnection = connection;
			this.rowsAffected      = this.query.RowsAffected;
			this.rowCount          = this.query.RecordCount;

			this.columns           = new VistaDBColumnCollection(this);
		}
Ejemplo n.º 10
0
        private Provider.VistaDB.VistaDBDatabase OpenDatabase(string cn)
        {
            Provider.VistaDB.VistaDBConnection conn = new Provider.VistaDB.VistaDBConnection();
            conn.ConnectionString = cn;
            conn.ReadOnly         = true;
            conn.Open();
            string dbName = conn.Database;

            conn.Close();

            return(new Provider.VistaDB.VistaDBDatabase(dbName, false, true));
        }
Ejemplo n.º 11
0
        /// <summary>
        /// Overloaded constructor.
        /// </summary>
        /// <param name="commText">V-SQL query text</param>
        /// <param name="connString">Connectionstring to a VistaDB database</param>
        public VistaDBDataAdapter(string commText, string connString)
        {
            VistaDBConnection conn = new VistaDBConnection(connString);

            selectCommand = new VistaDBCommand(commText, conn);
        }
Ejemplo n.º 12
0
		/// <summary>
		/// Releases the resources used by the component.
		/// </summary>
		public void Dispose()
		{
			this.columns           = null;
			this.vistaDBConnection = null;
			Close();
		}
Ejemplo n.º 13
0
 /// <summary>
 /// Overloaded constructor.
 /// </summary>
 /// <param name="commText">V-SQL query text</param>
 /// <param name="conn">VistaDBConnection object</param>
 public VistaDBDataAdapter(string commText, VistaDBConnection conn)
 {
     selectCommand = new VistaDBCommand(commText, conn);
 }
Ejemplo n.º 14
0
		/// <summary>
		/// Overloaded constructor.
		/// </summary>
		/// <param name="commText">V-SQL query text</param>
		/// <param name="connString">Connectionstring to a VistaDB database</param>
		public VistaDBDataAdapter( string commText, string connString )
		{
			VistaDBConnection conn = new VistaDBConnection(connString);
			selectCommand = new VistaDBCommand(commText, conn);
		}
Ejemplo n.º 15
0
 public IDbConnection GetConnection(string cn)
 {
     Provider.VistaDB.VistaDBConnection conn = new Provider.VistaDB.VistaDBConnection(cn);
     return(conn);
 }
Ejemplo n.º 16
0
		public string LoadDatabases(string cn)
		{
			string dbName = "";

			try
			{
				Provider.VistaDB.VistaDBConnection conn = new Provider.VistaDB.VistaDBConnection(cn);
				conn.Open();
				dbName = conn.Database;
				conn.Close();

				try
				{
					int index = dbName.LastIndexOfAny(new char[]{'\\'});
					if (index >= 0)
					{
						dbName = dbName.Substring(index + 1);
					}
				}
				catch {}
			}
			catch
			{
		
			}

			return dbName;
		}
Ejemplo n.º 17
0
		public IDbConnection GetConnection(string cn)
		{
			Provider.VistaDB.VistaDBConnection conn = new Provider.VistaDB.VistaDBConnection(cn);
			return conn;
		}
Ejemplo n.º 18
0
		/// <summary>
		/// Overloaded constructor.
		/// </summary>
		/// <param name="commText">V-SQL query text</param>
		/// <param name="conn">VistaDBConnection object</param>
		public VistaDBDataAdapter( string commText, VistaDBConnection conn)
		{
			selectCommand = new VistaDBCommand(commText, conn);
		}
Ejemplo n.º 19
0
		void IDisposable.Dispose()
		{
			vistaDBConnection = null;
		}
Ejemplo n.º 20
0
 internal VistaDBTransaction(VistaDBConnection connection)
 {
     vistaDBConnection = connection;
     vistaDBConnection.VistaDBSQL.BeginTransaction();
 }
Ejemplo n.º 21
0
 void IDisposable.Dispose()
 {
     vistaDBConnection = null;
 }
Ejemplo n.º 22
0
		private Provider.VistaDB.VistaDBDatabase OpenDatabase(string cn)
		{
			Provider.VistaDB.VistaDBConnection conn = new Provider.VistaDB.VistaDBConnection();
			conn.ConnectionString = cn;
			conn.ReadOnly = true;
			conn.Open();
			string dbName = conn.Database;
			conn.Close();

			return new Provider.VistaDB.VistaDBDatabase(dbName, false, true);
		}
Ejemplo n.º 23
0
		internal VistaDBTransaction(VistaDBConnection connection)
		{
			vistaDBConnection = connection;
			vistaDBConnection.VistaDBSQL.BeginTransaction();
		}
Ejemplo n.º 24
0
 /// <summary>
 /// Releases the resources used by the component.
 /// </summary>
 public void Dispose()
 {
     this.columns           = null;
     this.vistaDBConnection = null;
     Close();
 }