[Mono-list] ASP.NET + database: why reflection?

Maurizio Colucci seguso.forever@tin.it
Tue, 24 Jun 2003 18:46:02 +0200


On Tuesday 24 June 2003 18:30, Gonzalo Paniagua Javier wrote:
> > Hi,
> >
> > why do
> >
> >   xsp/test/dbpage1.aspx
> >   xsp/test/dbpage2.aspx
> >
> > use reflection to load the assembly dynamically?
>
> It's there to allow changing the database using the configuration files.
> If you know in advance that you're gonna use mysql or postgres or
> whatever it is much simpler than that. I bet your teacher wants you to
> find out how.


Pleeeeeease :-))))

I _did_ try to do without reflection... 

<%@ language="C#" %>
<%@ import namespace="System.Data" %>
<%@ import namespace="ByteFX.Data.MySQLClient" %>

but I get the error:

  The namespace `ByteFX.Data.MySQLClient' can not be found (missing
  assembly reference?)

Now, I _can_ see the problem! If it WERE a normal app I would just do

   mcs -r ByteFX.Data.dll

but since it is a web page, what can I do? In my wrox "beginning
ASP.NET" I could not find how to add an assembly reference...

Please help, I am desperate :-)
sigh

Maurizio