[Mono-list] The type or namespace `Npgsql' could not be found in xsp2
Eduardo Sanchez
ejsanchez at gmail.com
Mon Aug 21 20:43:43 EDT 2006
Hi!,
I'm testing mono+pgsql with xsp2, but keep getting the error:
"The type or namespace `Npgsql' could not be found"
I'm using CodeFile atribute in my index.aspx file:
<%@ Page language="C#" CodeFile="index.aspx.cs" Inherits="index_aspx"%>
My index.aspx.cs has the following:
// created on 8/20/2006 at 6:38 PM
using System;
using System.Web;
using System.Data;
using Npgsql;
public partial class index_aspx : System.Web.UI.Page
{
public void OnLoad(EventArgs e)
{
DisplayEmployees();
}
public void DisplayEmployees()
{
string connectionString=
"Server=localhost;"
+
"Database=<my_database>;" +
"User ID=<my_user>" +
"Password=<my_passwd>;";
NpgsqlConnection conn=new
NpgsqlConnection(connectionString);
conn.Open();
NpgsqlCommand command=new
NpgsqlCommand("SELECT * FROM rh_empleados",conn);
NpgsqlDataReader dr=command.ExecuteReader();
while(dr.Read())
{
Response.Write(dr[0]+ "\t");
Response.Write(dr[1]+ " " +dr[2]+ "\t\n");
}
conn.Close();
}
}
already installed the npgsql provider in the gac and tested it with a
Console application that seems to work without any problem.
I'm using the xsp2.exe version 1.1.16.1
Thanks in advance for any hint...
regards,
--
eduardo s.m.
More information about the Mono-list
mailing list