[Gambas-user] DataSource Sort Problem

Benoît Minisini g4mba5 at gmail.com
Sat Jul 21 16:51:24 CEST 2018


Le 19/07/2018 à 16:00, Ernest Wilson a écrit :
> Hello,
> 
> I'm using Gambas 3.11.2 and have an error with the Sort property of the 
> DataSource.
> 
> The DataSource on my Form connects to an SQLite Table consisting of 
> fields "ProcessID" and "ProcessTitle". The records are displayed in a 
> DataBrowser which functions properly.
> 
> I would like to have records displayed in order by the "ProcessTitle" 
> field, so I have used the following code to initialize the DataSource 
> when opening the Form:
> 
>    With DataSource1
>      .Connection = Connection5
>      .Table = "Processes"
>      .Sort = "ProcessTitle"
>    End With
> 
> The sort works properly when records are displayed, however, an error 
> dialog displaying the message "Invalid value" is presented before the 
> form opens. Clicking the OK response to the error dialog allows the 
> window to open and everything functions normally.
> 
> If I comment out the line with .Sort = "ProcessTitle", the error does 
> not occur, but of course, there is no sort.
> 
> Any ideas about how to fix this, will be much appreciated.
> 

It's fixed in commit 
https://gitlab.com/gambas/gambas/commit/a36359b1900114fb4cc671da136f6fd3ed8796c7.

Regards,

-- 
Benoît Minisini


More information about the User mailing list