Re: problem installing NPGSQL and pgOLEDB with .NET

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: RPK <rohitprakash123(at)indiatimes(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: problem installing NPGSQL and pgOLEDB with .NET
Date: 2007-02-24 07:15:02
Message-ID: 45DFE5F6.7090104@hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

RPK wrote:
> I have PostgreSQL 8.2 installed on Windows XP. I installed NPGSQL driver for
> .NET and tried to register it's dll with following command:
>
> regsvr32 c:\windows\system32\npgsql.dll
>
> It displays error: "Could not be registered, entry point not found".

regsvr32 is not used for .net assemblies, so that is correct.

> I copied the NPGSQL driver files in application folder, but when I open
> VB.NET and attempt to ADD REFERENCE to it, VB.NET displays an error saying:
> "A reference could not be added.". How to add reference to this driver?

That would normally work. Make sure you also have included the
Mono.Security.Dll file, which Npgsql depends on.

> Alternatively, I tried pgOLEDB. It got registered with regsvr32 but when I
> try to create connection string, it does not connect to the postgres
> database. It displays following error:
>
> [Test connection failed because of an error in initializing provider.
> Unspecified error.]
>
> I am left with the normal ODBC driver. It is working. Please also let me
> know which driver delivers best performance.

From .net, I would guess that NPgsql will deliver the best performance,
since there is no managed/unmanaged marshaling being done. There are a
lot of other advantages to using npgsql when you do .net development as
well, so you should really focus on getting that one to work.

//Magnus

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Magnus Hagander 2007-02-24 07:17:28 Re: 5 Weeks till feature freeze or (do you know where your patch is?)
Previous Message Joshua D. Drake 2007-02-24 05:57:11 Re: Composite Keys