[ROOT] Re: your mail

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Fri Jul 28 2000 - 18:43:27 MEST


Hi Boris,

   the problem is that TOracleServer does not yet exist in the current
release. As far as I know the implementation has been finished by
Michael Dahlinger at GSI but the code still has to be integrated.
Hopefully we will have it in the next release.

You could also access Oracle via an ODBC interface as implemented by
RDBC from Valery Onuchin:
http://www.phenix.bnl.gov/WWW/publish/onuchin/RDBC/

Cheers, Fons.



On Thu, Jul 27, 2000 at 02:22:49PM -0400, Boris Y Iyutin wrote:
> Hello. 
> 
> I am trying to define a new class which uses root libs
> and connects to oracle database. 
> 
> It compiles pretty much ok, but gives Segmentation fault 
> when calls TSQLServer::Connect. (Exactly the same piece of code 
> works well from root prompt)
> 
> Inside TSQLServer::Connect
> 
>  TSQLServer *TSQLServer::Connect(const char *db, const char *uid, const char 
> *pw)
> {
>    TSQLServer *serv = 0;
> 
>    if (!strncmp(db, "mysql", 5)) {
>       if (gROOT->LoadClass("TMySQLServer", "MySQL"))
>          return 0;
>       serv = (TSQLServer *) gROOT->ProcessLineFast(Form(
>              "new TMySQLServer("%s", "%s", "%s")", db, uid, pw));
>    } else if (!strncmp(db, "oracle", 6)) {
>       if (gROOT->LoadClass("TOracleServer", "Oracle"))
>          return 0;
>       serv = (TSQLServer *) gROOT->ProcessLineFast(Form(
>              "new TOracleServer("%s", "%s", "%s")", db, uid, pw));
>    }
>    return serv;
> }
> 
> 
> It crashes somewhere within this call since it does not go inside 
> TOracleServer constructor. Maybe gROOT->LoadClass does not work properly
> without root command prompt environment. libOracle.so looks ok. 
> I compiled it on the same computer and copied into $ROOTSYS/lib
> 
> Maybe you have some ideas.
> 
> Thank you very much. 
> 
> Boris. 

-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch              Phone: +41 22 7679248
WWW:    http://root.cern.ch/~rdm/            Fax:   +41 22 7677910



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:30 MET