The PostgreSQL C APIlibpq
Creating an Npgsql enabled VB Project
Creating a PostgreSQL client application is easy with the tools provided by Visual Studio, but before you start, there's one step that you'll need to follow every time you create a new Npgsql-enabled VB project.
When you create a new VB project, Visual Studio automatically links in a number of commonly used .NET framework components (such as System, System.Data, and System.Windows.Forms). If you're going to add Npgsql components to a VB project, you must define a "reference" to the Npgsql assembly. If you're not used to .NET terminology, think of an assembly as an object library, and the process of adding a reference as analogous to adding that library to the link command line.
To create a new VB project, open the File menu and choose New, then Project. When the New Project dialog appears, select Visual Basic Projects (in the box labeled Project Types), then click Windows Application (in the box labeled Templates).
To add an Npgsql reference to your project, open the Project menu and click Add Reference. When the Add Reference dialog appears, click Browse and open the Npgqsql.dll file (you'll find it in the DesktopNpgsqlinms directory if you've followed my recommendation). Click the Ok button to close the Add Reference dialog.