[Gambas-user] Getting data from table

Shane shanep1967 at ...169...
Fri Aug 10 08:27:51 CEST 2012


On 10/08/12 15:13, rocko wrote:
> I've read the help files and seen a lot of examples on how
> to add data to a table but I can' find any examples on how
> to get data from a table.
>
> I need to get total number of fields from a table. I've looked at:
> 'Property Read Count As Integer' in the Help file.
> Can i simply put this at the top of my class and then do a
> Print Count ??
>
> I need the Count so i can iterate thru the fields and extract data,
> something like:
> For Each Count
> 	get specific field
> 	do something with field
> Next
> I suppose I could use the primary key ID as the For Each loop
> But not sure about that.
>   
>
Try this

myResult = dbcon.find(myTable, "id = &1",ID)
     for each myResult
         TextBox1.text = myResult!myField1
         TextBox2.text = myResult!myField2
     next

>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
>
>





More information about the User mailing list