RE: TSQLServer connection timeout

From: Valeri Onuchin <Valeri.Onoutchine_at_cern.ch>
Date: Mon, 10 Jul 2006 09:20:54 +0200


Hi,
sorry. The MySQL conf. file can be used regardless MyODBC. BTW, for whose who knows/remembers -
is it possible to set connection timeout via MySQL ODBC DSN file?

Regards. Valeriy

-----Original Message-----
From: owner-roottalk_at_pcroot.cern.ch on behalf of Valeri Onuchin Sent: Mon 7/10/2006 8:59 AM
To: s.linev_at_gsi.de; Diego Faso; roottalk_at_pcroot.cern.ch Subject: RE: [ROOT] TSQLServer connection timeout  

Hi,
one can use MySQL ODBC driver (MyODBC) from ROOT. It allows to set connection timeout in the option file (C:\my.conf, /etc/my.cnf, ~/my.cnf etc.). As far as I remember, the option string is called "connect_timeout", check MySQL refs for details. HTH.

Regards. Valeriy

-----Original Message-----
From: owner-roottalk_at_pcroot.cern.ch on behalf of Linev Sergei Sent: Fri 7/7/2006 1:10 PM
To: Diego Faso; roottalk_at_pcroot.cern.ch
Subject: RE: [ROOT] TSQLServer connection timeout  

Hi, Diego

If you update your ROOT instalation from CVS, you will be able to use following syntax:

  TSQLServer::Connect("mysql://host.domain/test?timeout=10")

There are some more options (see TMySQLServer constructor documentaion). If you need some more, let me know.

Regards,
Sergey

> -----Original Message-----
> From: owner-roottalk_at_pcroot.cern.ch
> [mailto:owner-roottalk_at_pcroot.cern.ch] On Behalf Of Diego Faso
> Sent: Freitag, 7. Juli 2006 09:51
> To: roottalk_at_pcroot.cern.ch
> Subject: [ROOT] TSQLServer connection timeout
>
>
> Hi, I'm using the TSQLServer class in order to connect to a
> remote mysql
> database: my only problem is that I can't set a timeout for
> the connection.
> Is there a way to set a timeout for "TSQLServer::Connect" method?
> I would like the "TSQLServer::Connect" method to exit after
> few seconds if
> the remote database is not available.
>
> Here is my system configuration:
> OS: Gentoo Base System version 1.6.15
> kernel: 2.6.16-gentoo-r9
> gcc: version 3.4.6
> root version: 5.11/07
>
> Thank you in advance, cheers.
> Diego
>
Received on Mon Jul 10 2006 - 09:25:11 MEST

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:31:59 MET