A stack trace would be useful. If you check with the mysql command line utility the db is as expected, with the new value in yy? Does it work without first the insert statement? -- Fons On Thu, 2003-08-14 at 17:53, 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/ -- 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 7679480
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:14 MET