[Mono-list] Mono.Data.PostgreSqlClient can not be found in ASP.Net

amerigo5 amerigo5 amerigo5@hotmail.com
Mon, 26 May 2003 15:29:03 -0500


I am testing to connect to PostgreSQL database in ASP.Net but I am getting 
the following error:

Error message: /tmp/tmp323549c1.cs(27,0) : error CS0246: The namespace 
`Mono.Data.PostgreSqlClient' can not be found (missing assembly reference?)
(0,0) : error failed: 1 error(s), 0 warnings

I am using the following code:

<%@ language="C#" %>
<%@ import namespace="System" %>
<%@ import namespace="System.Data" %>
<%@ import namespace="Mono.Data.PostgreSqlClient" %>
<script runat=server>
void Page_Load (object sender, EventArgs e)
if (!IsPostBack){
                string connectionString = 
       IDbConnection dbcon;
       dbcon = new PgSqlConnection(connectionString);

       dbcon = null;
<title>PostgreSQL Test</title>

I know that the code inside the "Page_Load" function works in an ".exe" 
file. Do I have to do something when I connect to PostgreSQL using the 
"Mono.Data.PostgreSqlClient" assembly/namespace?



Tired of spam? Get advanced junk mail protection with MSN 8.