Number sequence in database

I think I’ve found either a bug or exposed my ignorance :slight_smile:

In the database, when I sort by “ID” I receive the following sequence:

…16,17,18,19,2,20,21… …27,28,29,3,30,31,32… And so on…

It seems that perhaps the single digits should have a zero in front, such as “02” or “002”, to be placed properly.

PS: I’m using 3.1 beta

Regards, Alec

Nice catch, Alec!
(And no, I hadn’t ever done that myself, or if I had, I failed to spot that problem).

One for Torben to repair … ;D but not by adding zeroes.

Sounds like the grid column has a string data type, or else the grid control’s built-in sort mechanism hasn’t been ‘told’ to sort the ID column as a number and not a string (assuming the control has that option for the programmer: not sure …).

Does this same problem happen in the grids in both the Playlist AND Library tabs, or just in the Library tab?

BFN
CAD

Thanks Cad!

No, it happens on the Library view and the BOTTOM window of Playlist; the “main” window Playlist does not have the issue.

3.1.0 build 724

Regards, Alec

Which build number is that exactly? I a made some changes to the way the data is fetched and stored, and I though that issue had been resolved now.

Just took a quick look into the SVN logs. The sorting should be fine in Build 732 and later, even without any leading 0s.

It’s build 724 (3.1 beta 1). I’ll upgrade. Thanks!

Regards, Alec