[Gambas-user] DataSource Sort Problem

Ernest Wilson gambasml at junkheaven.com
Thu Jul 19 16:00:52 CEST 2018


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.

-- 
Regards,
Ernest Wilson



More information about the User mailing list