RE: MaxDB Connection

From: Linev Sergei <S.Linev_at_gsi.de>
Date: Fri, 5 Oct 2007 15:54:16 +0200


Hi, Kerry

Can you try to use ROOT ODBC driver.
As far as I know, SapDB driver in ROOT anyhow implemented via ODBC interface. Just call it as follow:

TSQLServer* serv = TSQLServer::Connect("odbcd://DRIVER={MaxDB};SERVER=141.108.250.103;DATABASE=;UID=;PWD=","","");

Some databases instead of UID and PWD required USER and PASSWORD arguments in connection string. See some more possibilities for ODBC connection here:

http://root.cern.ch/root/html/TODBCServer.html#TODBCServer:TODBCServer

Regards,
Sergey

-----Original Message-----
From: owner-roottalk_at_root.cern.ch [mailto:owner-roottalk_at_root.cern.ch] On Behalf Of Lee, Kerry T. (JSC-SF)[LMIT] Sent: Freitag, 5. Oktober 2007 14:29
To: roottalk_at_pcroot.cern.ch
Subject: [ROOT] MaxDB Connection

Dear ROOTers,

I am using the latest released version 5.17.02 on CentOS linux.

I am trying to connect to a MaxDB database via TSapDBServer and I get the following error (I have excluded the DATABASE name, UID and PWD values below)

root [0] gSystem.Load("$ROOTSYS/lib/libRODBC.so")
(int)0

root [1] gSystem.Load("$ROOTSYS/lib/libSapDB.so")
(int)0

root [2] TSapDBServer *server =new TSapDBServer("sapdb://DRIVER={MaxDB};SERVER=141.108.250.103;DATABASE=;UID=;PWD=","","");

SQL state: r
SQL code: 15
SQL Errortext:

Error in <TSapDBServer::TSapDBServer>: allocation of db failed

I am using the libsqlod.so driver and have been able to connect via the commandline using

isql -v DATASOURCENAME UID PWD

so I am somewhat confindent that at least the driver is working properly.

Any help is appreciated.

Thanks
Kerry Received on Fri Oct 05 2007 - 15:54:32 CEST

This archive was generated by hypermail 2.2.0 : Fri Oct 05 2007 - 23:50:01 CEST