Hello,
I have a similar problem, but also with the new version, it still does
not work for me.
What I did is:
TSQLServer* serv =TSQLServer::Connect( ..) TTreeSQL* mytree=new TTreeSQL(serv,"gmc1", "waveform")
and I still get errors like:
Error in<TTreeSQL::GetColumnIndice>: Error finding column 0 (for any
variable)
Maybe I did something wrong?
My database is ok, I can even browse it as indicated under
http://root.cern.ch/root/html528/TSQLStatement.html # 3. Read.
Even TTree::MakeClass figures out the correct types of the leafes, but
every attempt to read an entry ends in
Error in <TTreeSQL::Show()>: Cannot read entry 0 (I/O error)
Any ideas / hints are very welcome..
Cheers,
Kathrin
On 02/25/2011 09:27 PM, Philippe Canal wrote:
> Hi,
>
> Thanks for reporting this problem. It is fixed by revision 38233 of
> the trunk.
>
> Cheers,
> Philippe.
>
> On 2/25/11 2:02 PM, Rob Mahurin wrote:
>> On Thu, Feb 24, 2011 at 01:05:17PM -0600, Philippe Canal wrote:
>>> Both problems were unexpected and have now been fixed in the trunk
>>> and in the v5.28 patch branch.
>>>
>>> The temporary table issue is due to the fact that mysql does not
>>> give access a list of those table the easy way (i.e. show table does
>>> not show them). The GetColumnIndice was an unfortunate oversight
>>> when reading table that has not been created by TTreeSQL.
>> Thank you Philippe!
>>
>> I seem to still be unable to get text data from temporary tables:
>>
>> root[] TSQLStatement* stmt = serv->Statement(
>> "create temporary table temp as "
>> "select 42 as number, 'something' as text")
>> root[] stmt->Process()
>> (Bool_t)1
>> root[] TTreeSQL t(serv, "test", "temp")
>> root[] t.Print()
>> **************************************************************************
>>
>> *Tree :temp : Database read from table:
>> temp *
>> *Entries : 1 : Total = 1445 bytes File Size
>> = 0 *
>> * : : Tree compression factor =
>> 1.00 *
>> **************************************************************************
>>
>> *Br 0 :number :
>> number/I *
>> *Entries : 1 : Total Size= 573 bytes One basket in
>> memory *
>> *Baskets : 0 : Basket Size= 32000 bytes Compression=
>> 1.00 *
>> *........................................................................*
>>
>> *Br 1 :text :
>> text[9]/C *
>> *Entries : 1 : Total Size= 567 bytes One basket in
>> memory *
>> *Baskets : 0 : Basket Size= 32000 bytes Compression=
>> 1.00 *
>> *........................................................................*
>>
>> root[] t.Scan()
>> ************************************
>> * Row * number * text *
>> ************************************
>> * 0 * 42 * *
>> ************************************
>> (Long64_t)1
>>
>> Thanks,
>> Rob
>>
>
Received on Mon Feb 28 2011 - 17:51:46 CET
This archive was generated by hypermail 2.2.0 : Mon Feb 28 2011 - 23:50:01 CET