On Sun, 2012-09-02 at 20:52 -0700, rocko wrote:
> After retrieving data and modifying it , I need to send it back to the
> table.
> I am tried the following:
> 
>  rTable = DB.Create("inventory")
>   sResult = DB.Find("inventory", id = &1, ID)
>            For Each sResult
>              $date1 = sResult!endDate
>              $date2 = Now
>              Print $date2 'debuging print statements
>              Print $date1
>              $left = sResult!daysLeft
>              $left = DateDiff($date2, $date1, gb.Day)
>              Print $left
>              sResult!endDate = $left
>              rTable.Update
>            Next
> 
> But sResult is read only and I also tried rTable but that adds a new
> record, I need to update the daysLeft field only.
> 
http://gambasdoc.org/help/comp/gb.db/connection/edit



------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to