Board index » jbuilder » Sorting problem

Sorting problem


2004-07-21 04:19:21 AM
jbuilder0
Hi, I'm trying to sort rows obtained from the
StorageDataSet.getInsertedRows(view) or StorageDataSet.getUpdatedRows(view)
in the same manner as the original its StorageDataSet.
Here a piece of code:
void Scan(DataSet p_Rows)
{
p_Rows.getStorageDataSet().getUpdatedRows(view);
view.setSort(p_Rows.getSort());
....
}
My view is never sorted, but the StorageDataSet is, and the setSort method
seems to take a while before returning. Does anybody knows why it doesn't
work?
Thank you.
 
 

Re:Sorting problem

Sorting is not supported for the updated/deleted/inserted rows.
-Steve
"Christian Falardeau" < XXXX@XXXXX.COM >wrote in message
Quote
Hi, I'm trying to sort rows obtained from the
StorageDataSet.getInsertedRows(view) or
StorageDataSet.getUpdatedRows(view)
in the same manner as the original its StorageDataSet.

Here a piece of code:

void Scan(DataSet p_Rows)
{
p_Rows.getStorageDataSet().getUpdatedRows(view);
view.setSort(p_Rows.getSort());
....
}

My view is never sorted, but the StorageDataSet is, and the setSort method
seems to take a while before returning. Does anybody knows why it doesn't
work?

Thank you.
 

Re:Sorting problem

Pls help... you gurus.
When I launch client and server projects on a same computer where MSSQL
server is running, clientdataset is not properly sorting by index like it
should.
For reference, this is an app created by Delphi Client/Server version 4.
Can any of you steer me to any direction so I can begin to investigate?
Somehow, it sorts correctly on same config on another machine... but, cannot
be able to detect any difference between the two.
Any direction would be helpful.
Much thanks in advance,
Richard C.
 

{smallsort}

Re:Sorting problem

Which field are you trying to sort on? Which data type?
Can it be something about the regional settings of the machine?
--
---
Guillermo Castaņo Acevedo
www.GrupoMillennium.com
"Richard Chuh" < XXXX@XXXXX.COM >wrote in message
Quote
Pls help... you gurus.

When I launch client and server projects on a same computer where MSSQL
server is running, clientdataset is not properly sorting by index like it
should.

For reference, this is an app created by Delphi Client/Server version 4.

Can any of you steer me to any direction so I can begin to investigate?
Somehow, it sorts correctly on same config on another machine... but,
cannot
be able to detect any difference between the two.

Any direction would be helpful.

Much thanks in advance,

Richard C.


 

Re:Sorting problem

Hi,
Currently, I have 2 tables in this manner.
Student (id, name)
result(student id, subject id, score)
I need to display in a grid the columns
(student id, student name, subject 1 result, subject 2 result, etc)
currently wat i did was define a dbgrid for table student. then on form
create, add the columns of subjects to the dbgrid. then onDrawColumnCell,
set the values of the result fields. This works fine except tat i can't sort
using the results. i need asort using the result. Anyone have suggestions
for me?