Skip to Content
author's profile photo Former Member
Former Member

UI- Link a table column to an EditText

Hi, I am trying to bind a Column of a table to an EditText, but I find an error '-7005(ffffe4a3)'

Data Source-Invalid table name,The version is SDk 6.5.

This is the code:

Private Function CreateMySimpleForm()

Dim oItem As SAPbouiCOM.Item

Dim oButton As SAPbouiCOM.Button

Dim oStaticText As SAPbouiCOM.StaticText

Dim oEditText As SAPbouiCOM.EditText

Dim oComboBox As SAPbouiCOM.ComboBox

Set oItem = oForm.Items.Add("EditText1", it_EDIT)

oItem.Left = 157

oItem.Width = 163

oItem.Top = 8

oItem.Height = 14

Set oEditText = oItem.Specific

'// bind the text edit item to the defined used data source

oEditText.DataBind.SetBound True, "OCRD", "CardCode"

Set oItem = oForm.Items.Add("StaticTxt1", it_STATIC)

oItem.Left = 7

oItem.Width = 148

oItem.Top = 8

oItem.Height = 14

oItem.LinkTo = "EditText1"

Set oStaticText = oItem.Specific

oStaticText.Caption = "Proveedor"

EndFunction

Add comment
10|10000 characters needed characters exceeded

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Apr 01, 2004 at 10:40 AM

    I guess you need to add the datasource before using it.

    'Add a ds

    dsOCRD = YourForm.DataSources.DBDataSources.Add("OCRD")

    'fill datasource with actual data

    dsOCRD.Query()

    HTH Lutz Morrien

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 01, 2004 at 11:42 AM

    Hi, Natalia

    You have to define a datasource(DBDataSource or UserDataSource). Then you can bind your text box to this datasource. See it in help and samples.

    Regards,

    Mark

    Add comment
    10|10000 characters needed characters exceeded