PostgreSQL Data Provider

This version of the Enterprise Library PostgreSQL Data Provider was tested against the PostgreSQL Database v8.4.1-1
and uses the Npgsql data provider v2.0.6 downloaded separately.

The PostgreSQL database and admin tools can be downloaded from http://www.enterprisedb.com/products/pgdownload.do#windows and are licence free.
The Npqsql .NET data provider can be downloaded from http://pgfoundry.org/frs/?group_id=1000140 and is licence free.

The following is an example of a configuration file using a PostgreSQL Data Provider:

[XML]
<configuration>
	<configSections>
		<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
	</configSections>
	<dataConfiguration defaultDatabase="Service_Dflt">
		<providerMappings>
			<add databaseType="EntLibContrib.Data.PostgreSql.NpgsqlDatabase, EntLibContrib.Data.PostgreSql, Version=4.1.0.0, Culture=neutral, PublicKeyToken=null" name="Npgsql" />
		</providerMappings>
	</dataConfiguration>
	<connectionStrings>
		<add	name="Service_Dflt"
			providerName="Npgsql"
			connectionString="Server=127.0.0.1;Port=5432;Database=Northwind;User ID=postgres;Password=postgres;Enlist=true;" />
		<add	name="NewDatabase"
			providerName="Npgsql"
			connectionString="Server=127.0.0.1;Port=5432;Database=Northwind;User ID=postgres;Password=postgres;"/>
		<add	name="DbWithNpgsqlAuthn"
			providerName="Npgsql"
			connectionString="Server=127.0.0.1;Port=5432;Database=Northwind;User ID=entlib;Password=********"/>
		<add	name="NwindPersistFalse"
			providerName="Npgsql"
			connectionString="Server=127.0.0.1;Port=5432;Database=Northwind;User ID=entlib;Password=********;Persist Security Info=false"/>
	</connectionStrings>
</configuration>

Last edited Dec 22, 2009 at 8:26 PM by ewdev, version 3

Comments

fredbest Apr 8, 2010 at 11:24 PM 
where do I put the dll's ??? Do I compile them into the MS Ent Libs or just copy to my project directory???