on 01-26-2005 11:03 AM
Hi,
I have a user table (MyTable), with a user field (REF),
a form created with Screen Painter.
I load the form using SBO_Application.LoadBatchActions(XML), add a dbdatasource - oForm.DataSources.DBDataSources.Add("@MyTable"),
fill an edittext with the value in the field - oForm.Items.Item("oREF").Specific.Databind.SetBound(True, "@MyTable", "U_REF")
Everything is fine until now,
the user changes the value of the edittext, and when click in the Add/Update button, I want to post this new value in "MyTable".
I am using -
oform.DataSources.DBDataSources.Item("@MyTable").SetValue("U_REF", 0, oEditText.Value)
In debug, after that code line, if I get the field value (.GetValue("U_REF", 0) ), it gives the correct value, but after i close the form and see the user table, it isn't updated, the field didn't changed.
What I have to do to change the field value?
Thanks,
Ribeiro Santos
I solved using:
If oCompany.UserTables.Item("MyTable").GetByKey(1) Then
oCompany.UserTables.Item("MyTable").UserFields.Fields.Item("REF").Value = "My NewValue"
lRet = oCompany.UserTables.Item("MyTable").Update
if lRet <> o then
...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.