[Mono-list] Problem with a web serivce method.
Jonathan Stowe
jns@gellyfish.com
Tue, 24 Aug 2004 12:19:49 +0100
On Tue, 2004-08-24 at 08:28, beniniva@csr.unibo.it wrote:
> Sorry...
>
> This is a c# example: TdMio.cs.
> It works well:
>
> [root@or2 Desktop]# mcs ProvaTD.cs -r:System.Data.dll
> Compilation succeeded
> [root@or2 Desktop]# mono ProvaTD.exe
> esiste una sessione attiva
> CodiceSessione Problema Stato Nome Utente
> 12 1 Attiva Null U1
>
The fact that it works from the command line and not as a webservice
would indicate that you probably have ODBC setup as user DSN rather than
a system one - you need to create the DSN in the /etc/odbc.ini (or
wherever that is on your system) rather than in ~/.odbc.ini . If you
have already done this then it could be that the user your apache runs
as cannot read the /etc/odbc.ini
/J\
>
>
>
>
> >Scrive Jonathan Stowe <jns@gellyfish.com>:
>
> > On Mon, 2004-08-23 at 15:08, beniniva@csr.unibo.it wrote:
> > > Isql is an utility of unixODBC
> > >
> >
> > Er yes, but I meant a c# example that run at the console and not a
> > webservice.
> >
> > It will probably be enough to do just:
> >
> > using System;
> > using System.Data;
> >
> > class Foo
> > {
> > public static void Main()
> > {
> > OdbcConnection conn = new
> >
> OdbcConnection("DRIVER=MySQL;SERVER=localhost;DATABASE=tdmio;UID=root;PASSWORD=rootpwd;");
> >
> > conn.Open();
> > }
> > }
> >
> >
> >
>
>