Hi Fabrice, yes you must convert the string to int or double depending on the fields type in the DB. Use atoi() or atof() or equivalent. Cheers, Fons. Fabrice Podlyski wrote: > > Hello, > > My problem is the following : > I want to do some plots and make a ntuple > (or a tree) using the results of a SQL query > (database : MySql). Is it possible ? > > I succeed to create tables, fill them and do > some SQL query : all works very well !!! > > I try to put the results of the query in an Ntuple > but i didn't succeed : the method GetField (applied > on a TSQLRow object) return a pointer of type character! > > must i use some c/c++ specific functions ? (to manipulate the string) > I search for an example but i don't find it ! > > Thank you in advance for your help, > > Fabrice -- 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 7677910
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:50 MET