Hi Isomorphic,
I just noted following error:
See this ds.xml:
The intention is that the data within this DS is already sorted when the data is received by the client.
The DS is bound to a ListGrid with setDataSource(DS).
The SQL executed (c&p from server log) is:
As you can see, because of auto-paging/lazy load the "users.lastname ASC" from the <orderClause> is not applied to the outermost SELECT.
From an SQL Server point of view it is OK to deliver the rows in an unordered (even nondeterministic) resultset, then. (see common questions on views with order by clause not working as expected)
Of course I can to a clientside sort, but this should nevertheless be treated as a bug. What do you think?
Thanks,
Blama
I just noted following error:
See this ds.xml:
Code:
<DataSource schema="dbo" dbName="SQLServer" tableName="users" ID="users" dataSourceVersion="1" serverType="sql"> <fields> <field primaryKey="true" name="id" title="ID" type="sequence" hidden="true"></field> <field name="givenname" title="Vorname" length="50" type="text" required="true"></field> <field name="lastname" title="Nachname" length="50" type="text" required="true"></field> <field name="gender" title="M/W" length="1" type="text" required="true"> <valueMap> <value>M</value> <value>F</value> </valueMap> </field> <field name="email" title="eMail" length="50" type="text"> <validators> <validator type="regexp" expression=".+@.+\.[a-z]+" errorMessage="Dies ist keine gueltige eMail-Adresse." /> <validator type="doesntContain" substring=" " errorMessage="Die eMail-Adresse darf kein Leerzeichen enthalten." /> </validators> </field> </fields> <operationBindings> <operationBinding operationType="fetch"> <orderClause>users.lastname ASC</orderClause> </operationBinding> </operationBindings> </DataSource>
The DS is bound to a ListGrid with setDataSource(DS).
The SQL executed (c&p from server log) is:
Code:
SELECT * FROM (SELECT *, ROW_NUMBER() OVER (ORDER BY x.id) AS rowID FROM (SELECT TOP 100 PERCENT users.id, users.email, users.givenname, users.lastname, users.gender FROM dbo.users WHERE ('1'='1') ORDER BY users.lastname ASC) x) y WHERE y.rowID BETWEEN 1 AND 75
From an SQL Server point of view it is OK to deliver the rows in an unordered (even nondeterministic) resultset, then. (see common questions on views with order by clause not working as expected)
Of course I can to a clientside sort, but this should nevertheless be treated as a bug. What do you think?
Thanks,
Blama
Comment