[Gambas-user] Getting data from table
Olivier Cruilles
linuxos at ...1896...
Fri Aug 10 18:18:23 CEST 2012
Yes, in parenthesis
Cordialement,
Olivier Cruilles
Mail: linuxos at ...1896...
Le 10 août 2012 à 18:15, rocko <sunblaster5 at ...626...> a écrit :
> Should the table name be in parenthesis??
> I'm getting an error:
> "Unknown Identifier: inventory"
>
> sResult = $hConn.Find(inventory, "id = &1 ", ID)
> For Each sResult
> $date1 = sResult!endDate
> $date2 = sResult!startDate
> Print DateDiff($date1, $date2, gb.Day)
>
> On Fri, 2012-08-10 at 16:27 +1000, Shane wrote:
>> 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
>>>
>>>
>>>
>>
>>
>> ------------------------------------------------------------------------------
>> 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
>
>
>
> ------------------------------------------------------------------------------
> 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