コード例 #1
0
ファイル: SqlPostgres.cs プロジェクト: blacha14/nitrogen
		protected override void SqlConnection(IPropertiesConnection propertiesConnection,
			ISqlConnection<SqlPostgres> sqlConnection)
		{
			//connection = new NpgsqlConnection("Host=localhost;Username=postgres;Password=programowanie;Database=Banki");
			this.sqlConnection = sqlConnection;
			SchemaName = propertiesConnection.Schema;
			try
			{
				connection = new NpgsqlConnection(
					"Host=" + propertiesConnection.Host + 
					";Username="******";Password="******";Database=" + propertiesConnection.DBname);
			}
			catch (NpgsqlException ex)
			{
				throw new SqlExceptions(ex.Message);
			}
			finally
			{
				sqlConnection.CloseConnection();
			}
		}
コード例 #2
0
ファイル: SqlBase.cs プロジェクト: blacha14/nitrogen
		protected abstract void SqlConnection(IPropertiesConnection propertiesConnection,
			ISqlConnection<SqlPostgres> sqlConnection);