Re: [ROOT] TSQLResult pb

From: Dr. John Krane (jkrane@fnal.gov)
Date: Thu Aug 14 2003 - 19:04:10 MEST


Hi,

I have been using ROOT with mysql with great success.  My code looks 
identical to the Connect and "select" query you have below.  I am using 
Fermi RedHat Linux v9.01 and gcc 3.2.2-5. 

The problem might lurk in your database.  I'm not an SQL expert, so my 
help is limited to the above.

    - John

jony@lep1.tau.ac.il wrote:

>Hi,
>i try to read informations from a Mysql db with root;
>i opened the connection without problem. When i want to write  data into the 
>db with TSQLResult it's ok; but when i want to try to read data, i obtain a 
>segmentation violation; someone has an idea ?
>    thanks
>               Jony
>
>this is my code :
>int main(int argc,char ** argv){
>cout << "connecting ..." <<endl;
>TSQLServer *dbh = TSQLServer::Connect
>("mysql://xx.xx.xx/test","login","passwd");
>cout <<"connected !"<<endl;
>cout <<"before reult"<<endl;
>// the following line works :
>//TSQLResult *res = dbh -> Query("insert into yy values(...);
>/ the folowing line doesn't work
>TSQLResult *res = dbh -> Query ("select name from detector");
>cout <<"after result"<< endl;
>}
>
>the result is :
>connecting ...
>connected !
>before result
>
> ***Break *** segmentation violation
>Abort
>
>
>-------------------------------------------------
>This mail sent through IMP: http://horde.org/imp/
>  
>



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:14 MET