Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 6 of 6 total
Thread Dataset / Grid sorting
Wed, May 23 2018 2:11 AMPermanent Link

Eivind

All

I'm having a hard time sorting my dataset / data bound grid a a Time column. My backend are SQL server / IIS ISAPI dll. The "problem columns" is a SQL server Time column. It comes sorted on that time columns from the server and shows perfectly in the grid. Once I insert a new record on the client I want it to sort the grid / dataset based on the time column. However, when I try to set sort order (Ascending) on either the grid column or using the Sort function on the data set, it always puts it on the bottom last row.

My only solution until now is to create a new calculated field in the dataset and assign the time value as a string. Now, when sorting on that column, it works perfectly.  Please see the two attached pictures. The pictures named "Sort on Time" shows that the newly inserted row is on the bottom and you can see sorting is active on the first column. On the second picture, "Sort on String" you can see the new row sorts perfectly.

Can this be SQL server related? Just as a side note, in the Database Manager in the IDE, I'm unable to use Time fields in any query there. If I try to select or order by any Time fields there I get: "Dataset Open error: Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another." PS. I only use the Database Manger to test my queries and get the fields defs set up.

Anyone else seen this before?

Thanks

Eivind
Tue, May 29 2018 1:04 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Eivind,

<< I'm having a hard time sorting my dataset / data bound grid a a Time column. My backend are SQL server / IIS ISAPI dll. The "problem columns" is a SQL server Time column. It comes sorted on that time columns from the server and shows perfectly in the grid. Once I insert a new record on the client I want it to sort the grid / dataset based on the time column. However, when I try to set sort order (Ascending) on either the grid column or using the Sort function on the data set, it always puts it on the bottom last row. >>

How are you generating the JSON on the server side ?

Tim Young
Elevate Software
www.elevatesoft.com
Fri, Jun 1 2018 6:30 PMPermanent Link

Eivind

Tim

The JSON is generated by the TEWBDataSetAdapter in the ISAPI dll

Br
Eivind
Tue, Jun 5 2018 11:24 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Eivind,

<< The JSON is generated by the TEWBDataSetAdapter in the ISAPI dll >>

Okay, the issue seems to be that the date/time values coming from the server side include odd date portions for times, and vice-versa for dates (times can contain odd values), so I've added functionality in the dataset loading to strip out the invalid portions of both so that they can be sorted properly in a binary fashion.

This fix will be in build 15.

I'm still looking into the SQL Server time issue.

Tim Young
Elevate Software
www.elevatesoft.com
Wed, Jun 6 2018 6:36 AMPermanent Link

Walter Matte

Tactical Business Corporation

Not sure what the SQL Server time issue is - I have had issues in the past where I needed to make sure the SQL Client was installed on the machine where my programs run(including my ewb web server).  When SQL Client not installed newer data types like date and time did not format in queries as expected.

Walter
Thu, Jun 7 2018 12:41 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Walter,

<< Not sure what the SQL Server time issue is - I have had issues in the past where I needed to make sure the SQL Client was installed on the machine where my programs run(including my ewb web server).  When SQL Client not installed newer data types like date and time did not format in queries as expected. >>

That's a good point.

Eivind - which SQL Server client are you using ?

Tim Young
Elevate Software
www.elevatesoft.com
Image