cancel
Showing results for 
Search instead for 
Did you mean: 

UI 6.7 - DBDataSources and Post Data

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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

...