Пример #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);
        }
Пример #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;
        }
Пример #3
0
		internal VistaDBDataReader(int rowsAffected_)
		{
			this.rowsAffected      = rowsAffected_;

			this.opened            = false;
			this.rowCount          = 0;
			this.vistaDBConnection = null;
		}
Пример #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;

		}
Пример #5
0
        internal VistaDBDataReader(int rowsAffected_)
        {
            this.rowsAffected = rowsAffected_;

            this.opened            = false;
            this.rowCount          = 0;
            this.vistaDBConnection = null;
        }
Пример #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;
		}
Пример #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;
        }
Пример #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);
        }
Пример #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);
		}
Пример #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));
        }
Пример #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);
        }
Пример #12
0
		/// <summary>
		/// Releases the resources used by the component.
		/// </summary>
		public void Dispose()
		{
			this.columns           = null;
			this.vistaDBConnection = null;
			Close();
		}
Пример #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);
 }
Пример #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);
		}
Пример #15
0
 public IDbConnection GetConnection(string cn)
 {
     Provider.VistaDB.VistaDBConnection conn = new Provider.VistaDB.VistaDBConnection(cn);
     return(conn);
 }
Пример #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;
		}
Пример #17
0
		public IDbConnection GetConnection(string cn)
		{
			Provider.VistaDB.VistaDBConnection conn = new Provider.VistaDB.VistaDBConnection(cn);
			return conn;
		}
Пример #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);
		}
Пример #19
0
		void IDisposable.Dispose()
		{
			vistaDBConnection = null;
		}
Пример #20
0
 internal VistaDBTransaction(VistaDBConnection connection)
 {
     vistaDBConnection = connection;
     vistaDBConnection.VistaDBSQL.BeginTransaction();
 }
Пример #21
0
 void IDisposable.Dispose()
 {
     vistaDBConnection = null;
 }
Пример #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);
		}
Пример #23
0
		internal VistaDBTransaction(VistaDBConnection connection)
		{
			vistaDBConnection = connection;
			vistaDBConnection.VistaDBSQL.BeginTransaction();
		}
Пример #24
0
 /// <summary>
 /// Releases the resources used by the component.
 /// </summary>
 public void Dispose()
 {
     this.columns           = null;
     this.vistaDBConnection = null;
     Close();
 }