[Gambas-user] DataSource

T Lee Davidson t.lee.davidson at gmail.com
Mon Nov 23 04:58:12 CET 2020


On 11/22/20 4:59 PM, Fabien Bodard wrote:
> I need help..
> 
> I want my datasource reach a given line given one field and not a line
> index... how can I achieve that quickly ... Actually I'm doing it by a
> Force and stupid way.
> 
> 
> Static Private reference As String
> 
> Public Sub Run(Value As String)
> 
>    reference = Value
>    FClientEdit.Showmodal
> 
> End
> 
> Public Sub Form_Open()
> 
>    Dim i As Integer
>    Dim aGeo As String[]
> 
> '----- HERE HOW TO FIND LINE :-/ --------------
>    DataSource1.MoveFirst
>    For i = 0 To DataSource1.Count - 1
>      If DataSource1["reference"] = reference Then Break
>      DataSource1.MoveNext
>    Next
> '-------------------------------------------

DataSource1.Table = "SELECT * FROM `table` where `reference`='reference'"
?


-- 
Lee


More information about the User mailing list