Npgsql
This .NET Framework Class Library is provided by Npgsql Development Team.
The class library is contained in the file Npgsql.dll.
The class library is contained in the file Npgsql.dll.
Coding
Add a reference to the assembly Npgsql and include the Npgsql namespace. Instantiate a new NpgsqlConnection connection object. Set the connection string and open the connection.
VB.NET code sample
C# code sample
VB.NET code sample
Imports Npgsql
Dim myConnection As NpgsqlConnection = New NpgsqlConnection()
myConnection.ConnectionString = myConnectionString
myConnection.Open()
' execute queries, etc
myConnection.Close()
Dim myConnection As NpgsqlConnection = New NpgsqlConnection()
myConnection.ConnectionString = myConnectionString
myConnection.Open()
' execute queries, etc
myConnection.Close()
C# code sample
using Npgsql;
NpgsqlConnection myConnection = new NpgsqlConnection();
myConnection.ConnectionString = myConnectionString;
myConnection.Open();
// execute queries, etc
myConnection.Close();
NpgsqlConnection myConnection = new NpgsqlConnection();
myConnection.ConnectionString = myConnectionString;
myConnection.Open();
// execute queries, etc
myConnection.Close();
Description
Npgsql is a .Net Data Provider for Postgresql. It allows any program developed for .Net framework to access database server. It is implemented in 100% C# code. Works with Postgresql 7.x and above.
More info about this class library can be found at the Npgsql Development Team product page.
Download
.NET Framework Class Library (Npgsql) can be downloaded here.
Connection Strings
Additional info or comments on this class library? Want to submit content?