[Mono-list] The type or namespace `Npgsql' could not be found in xsp2

Eduardo Sanchez ejsanchez at gmail.com
Mon Aug 28 17:13:57 EDT 2006


Yep, you were right, I added  the following 2 lines:

<%@ import Namespace="Npgsql"%>
<%@ Assembly Name="Npgsql"%>

thought it wasn't necessary as I was declaring it in my .cs CodeBehind file.
thanks..
regards,
  -eduardo s.m.



On 8/23/06, Daniel Morgan <monodanmorg at yahoo.com> wrote:
> Just a guess.  Maybe you need an assembly tag at the
> top of your index.aspx
>
> --- Eduardo Sanchez <ejsanchez at gmail.com> wrote:
>
> > 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.
> > _______________________________________________
> > Mono-list maillist  -  Mono-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-list
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>


-- 
--
eduardo s.m.


More information about the Mono-list mailing list