[Mono-devel-list] OS/X, Postgres and Npgsql Problem
Jason Foster
retsofaj at mac.com
Thu Jul 29 21:25:14 EDT 2004
Problem
-------
As near as I can tell, Npgsql is happily installed but cannot be
accessed by sqlsharp. gacutil can find it, IronPython can find it, but
sqlsharp can't.
Environment
-----------
- OS/X 10.3.4 with all patches
- stock Mono 1.0 install
- Postgresql 7.4.3
- IronPython 0.6
Discussion
----------
> gacutil -l | grep Npgsql
Npgsql, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=5d8b90d52f46fda7
> mono ~/Development/IronPython-0.6/bin/IronPythonConsole.exe
import sys
sys.LoadAssemblyByName("Npgsql")
import Npgsql
c = Npgsql.NpgsqlConnection("Server=127.0.0.1;Port=5432;User
Id=jafoster;Password=secret;Database=test;")
c.Open()
cmd = Npgsql.NpgsqlCommand("insert into t values(1)", c)
i = cmd.ExecuteNonQuery()
c.Close()
[this works fine and inserts a row into the table]
> sqlsharp
SQL# \Provider Npgsql
The default Provider is LOADEXTPROVIDER
Assembly: Npgsql
Connection Class: Npgsql.NpgsqlConnection
SQL# \ConnectionString
host=localhost;dbname=test;user=jafoster;password=password
SQL# \Open
Attempt to open connection...
Loading external provider...
Error: unable to load the assembly of the provider: Npgsql : File
'Npgsql' not found.
More information about the Mono-devel-list
mailing list