[Gambas-user] DataSource Sort Problem

Benoît Minisini g4mba5 at gmail.com
Thu Jul 19 16:39:46 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.
> 

If you can provide a little project (with a little database) that 
reproduces the bug, it would be great.

-- 
Benoît Minisini


More information about the User mailing list