[Gambas-user] Send data back to SQLite3 Table??
Bruce
bbruen at ...2308...
Mon Sep 3 06:42:30 CEST 2012
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
More information about the User
mailing list