views:

441

answers:

3

Hi. I try to work with my postgre DB via SubSonic. I have simple config:

<configuration>
  <connectionStrings>
    <add name="test"
      connectionString="Server=localhost;Port=5432;User Id=iliy;Password=111;Database=test;"
      providerName="Npgsql"/>
  </connectionStrings>
</configuration>

But it does not work. I got "Unable to find the requested .Net Framework Data Provider. It may not be installed." There is Npgsql reference in project.

What's wrong?

+2  A: 

I think you need to dig a little deeper into Subsonic for it to work with Postgres, because it does not know about any data provider for the database. It comes with providers for MS Sql Server, MySql, SqlLite etc.

TheVillageIdiot
+1  A: 

Did you add

<add name="Npgsql Data Provider" invariant="Npgsql" description=".Net Framework Data Provider for PostgreSQL Server" type="Npgsql.NpgsqlFactory, Npgsql, Version=2.0.6.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7"/>

to <DbProviderFactories> in C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config

?

"Unable to find the requested .Net Framework Data Provider. It may not be installed." Is not Subsonic exception.

Can't do it that way if not on a dedicated host or virtual server.
Sam
A: 

"All Database belong to us"..... ai....don't even can support MS Access or Postgres.... I will switch back to nHibernate. :(

mokth