Skip to Content
Former Member
Dec 20, 2011 at 08:24 AM

Insert Into(UDT)


Hello experts, I create UDT table in my [SBO-COMMON. I just want to ask how can I insert record in my table?

I have a edittext in my form.

            Dim oEditText As SAPbouiCOM.EditText
            oEditText = oForm.Items.Item("txtCode").Specific

            Dim oComapny As SAPbobsCOM.Company = SBO_Application.Company.GetDICompany
            Dim rsResult As SAPbobsCOM.Recordset = oComapny.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)

            rsResult.DoQuery("INSERT INTO [SBO-COMMON]..sports (name) VALUES('" & oEditText.Value & "')")

        Catch ex As Exception
        End Try

When I click the insert button. The value of my field(name) is NULL. But I actually put a value in my edittext before I click the insert button.

Please help.