📚 SAP Business One SDK Help

DBDataSource Object
See Also  Members  Example

Description

Represents a SAP Business One database table to be attached to a form.

Object Model


Remarks

The following restrictions apply to system DBDataSource objects in system forms:

  • You cannot perform a query on the data source or change its offset.
  • You can only attach items to user-defined fields in the data source.

Example

Using DBDataSource objects (Visual Basic)Copy Code
Public Sub UsingDBDataSource()

    Dim oForm As SAPbouiCOM.Form
    Dim oDBDataSource As SAPbouiCOM.DBDataSource

    Dim i As Long

    '// add a new form
    Set oForm = SBO_Application.Forms.Add("SampleForm")

    '// Add a DBDataSource to Bussines Partners table
    Set oDBDataSource = oForm.DataSources.DBDataSources.Add("OCRD")

    '// Execute the query with the conditions collection

   oDBDataSource.Query

   '// Navigating through the result set

    For i = 0 To oDBDataSource.Size - 1
        oDBDataSource.Offset = i
    Next i

End Sub

See Also