[Gambas-user] Database update
Steven Lobbezoo
steven at ...1652...
Sat Mar 10 08:05:41 CET 2007
Hi,
I'm setting up my first app with a database.
All works just fine, but i'm stuck with the update :
I do :
DIM rsD as result
PUBLIC SUB Button1_Click()
DIM rfield AS ResultField
DIM ctrl AS Control
DIM Lbox AS ComboBox
DIM MySw AS Integer = FALSE
'let's see if we want to update
FOR EACH ctrl IN ME.Controls
IF Object.Type(ctrl) = "TextBox" THEN
IF Object.GetProperty(ctrl, "Text") THEN
IF Object.GetProperty(ctrl, "Text") <>
Object.GetProperty(ctrl, "Tag") THEN
MySw = TRUE
message.Info(rsD[Object.GetProperty(ctrl, "Name")])
rsD[Object.GetProperty(ctrl, "Name")] =
Object.GetProperty(ctrl, "Text") ' move it in
END IF
END IF
END IF
NEXT
IF MySw = TRUE THEN
IF rsD THEN 'we have red something
rsD.update()
ELSE ' we migth want to add something
END IF
END IF
ME.Close
END
---------------------------------
Whatever, gambas tells me that "Result is read-only".
In the doc is says that Result is read/write
How comes ?
Thanks, Steven
More information about the User
mailing list