Page 1 of 1

IndexFieldName,SequenceField,Sort Field

Posted: 18.08.2010, 00:08
by sfxcc
I was trying to use indexfield = my fieldname but it seams it doesnt work .

Any idea ???

What does SequenceField, and Sort Field.

Does it work if i change it in real time ???? I tried and didnt work .

I want to to groupby a ztable it is possible ???

Thanks
Sérgio Francisco

Posted: 18.08.2010, 10:41
by guidoaerts
if you have fields on which you have an secondary index, you can use those for indexfield; sequencefield is for a ( for example :autoincrement) field on which you have a sequence (trigger for autoincrement), so zeos knows how to handle it; Sort fields is the fields on which to sort the data if you want to, but group by is not possible with ztable

Posted: 18.08.2010, 13:57
by sfxcc
Thank you guidoaerts,

I have 3 choices, i use in memory data and handle a groupby under component by my self . use a zquery (select * from table group by field), or try to find a dataset componet that does this for me.

Do u know any dataset component that does this on lazarus and delphi compatible.

I can try to create one just by copying all rows from a ztable or zquery (etc) and do all of this (maybe is the best way..do it all in memory)

SF

Posted: 18.08.2010, 14:09
by guidoaerts
you can use zquery, make op your sql in any way you want, filter and group by and whatever; and then you can sort the resultset in the component itself once more and re-sort again;
do you still want more?
Guido

Posted: 18.08.2010, 17:25
by sfxcc
I might have to do the in memory table.

1 - Query is slow i need a speed group by - i can doit the slow way(query) but ppl need to wait more...

2 -
Im doing a dbtreegrid and need to acess data in many places without to move cursor and is impossible to do this with a normal dataset , so i ll maybe need to create a dataset tha connects to originaldata dataset to copy the records to mem (i can work the data filters here by my self) or just to move the cursor on the original data and leave the cursor intact on this fake dataset.

So ill need to do a fake dataset with master detail , groupby , sort ... builtin

The prob is i dont know if it will be faster then doing the query??
Ill test this inmemory / fake table table qith Multiple Datalinks with its own databuffer to acess anywhere.

thanks for your help
SF