IBM.Data.DB2.DB2ConnectionSettings.GetRealOpenConnection C# (CSharp) Method

GetRealOpenConnection() public method

public GetRealOpenConnection ( IBM.Data.DB2.DB2Connection connection ) : DB2OpenConnection
connection IBM.Data.DB2.DB2Connection
return DB2OpenConnection
		public DB2OpenConnection GetRealOpenConnection(DB2Connection connection)
		{
			if(pool != null)
			{
				return pool.GetOpenConnection(connection);
			}
			else
			{
				return new DB2OpenConnection(this, connection);
			}
		}

Usage Example

Ejemplo n.º 1
0
        unsafe public void Open()
        {
            if (disposed)
            {
                throw new ObjectDisposedException("DB2Connection");
            }

            if (this.State == ConnectionState.Open || this.State == ConnectionState.Connecting || this.State == ConnectionState.Executing || this.State == ConnectionState.Fetching)
            {
                throw new InvalidOperationException("Connection already open");
            }

            try
            {
                openConnection = connectionSettings.GetRealOpenConnection(this);
            }
            catch (DB2Exception)
            {
                Close();
                throw;
            }
        }
All Usage Examples Of IBM.Data.DB2.DB2ConnectionSettings::GetRealOpenConnection