Re: Question about accessing a Postgres DBserver from a ROOT-based application

From: Philippe Canal <pcanal_at_fnal.gov>
Date: Fri, 22 Aug 2008 13:13:50 -0500


Hi Charlie,

TSQLConnection is not a ROOT class per se. It belongs to the package RDBC which is built on top of ROOT (and is now obsolete).

For examples see the tutorials in $ROOTSYS/tutorials/sql

The connection is specified using:

TSQLServer *db = TSQLServer::Connect("pgsql://dbserver_name/schema", "username", "password");

Cheers,
Philippe.

Charles Maguire wrote:
> Dear ROOT team,
>
> I am chasing down a problem with accessing a local Postgres DB server
> using
> ROOT-based collaboration software. The server seems to be accessible
> well enough using psql interactive commands, and the collaboration
> software
> has worked with this server at least as of a year ago.
>
> First question: a connection error is being reported by a method which
> returns a TSQLConnection
> class member. Is the TSQLConnection class a ROOT class. I did not
> find it
> in the list http://root.cern.ch/root/html/ClassIndex.html , although
> someone suggested to
> me that it was a ROOT class. Possibly there is a library mis-match
> somewhere.
>
> Second question: is there a simple closed, macro example in the ROOT
> documentation of
> making a connection to a Postgres server with the TSQLServer class. I
> did see some mails
> (e.g. June 10, 2003) referring to this capability, but was looking for
> a canned example.
>
> Hope the description is precise enough. I am chasing the other usual
> suspects (e.g.
> .odbc.ini file) too.
>
> Thanks,
> Charlie Maguire
>
Received on Fri Aug 22 2008 - 20:14:03 CEST

This archive was generated by hypermail 2.2.0 : Sat Aug 23 2008 - 05:50:09 CEST