CxDbsEditor Methods

The CxDbsEditor object contains the following methods:

Connect

The Connect method connects the object to a service.

Syntax

Connect(DomainSiteService As String)

Parameters

Parameter Required Description

DomainSiteService

Yes

The [Domain]Site.Service to which to connect. The domain is optional. The service must be a valid one.

Remarks

Returns 0 if successful and a non-zero value if the connection failed.

Example

The following example connects the Client object to the CYGDEMO.<SVC> on domain 5410:

Copy
Connect
Sub

    Dim DbsEditor
    Set DbsEditor = CreateObject("CxEditors.CxDbsEditor")
    DbsEditor.Connect("[5410]CYGDEMO.DBS")

End Sub

Back to top

Disconnect

The Disconnect method disconnects from the connected service.

Syntax

Disconnect() As Integer

Remarks

The Disconnect method returns 0 if successful and a non-zero value if the disconnect failed.

Example

The following example disconnects the Client object from the connected service, and pops a message box if it is unsuccessful:

Copy
Disconnect
Sub Svc.Disconnect()
 
    <SvcClient>.Disconnect()
    MsgBox "Service has disconnected."
    
    If <SvcClient>.Disconnect <> 0 
    Then
        MsgBox "Failed to disconnect."
    End If

End Sub

Back to top

View

The View method launches a DBS Properties dialog box for the specified database key, that is used to view record details.

Syntax

View(Key As String, EditEnabled As Boolean) As Integer

Parameters

Parameter Required Description

Key

Yes

The database key (DbKey) of the record to view/edit.

EditEnabled

Yes

Set this parameter to true to enable editing of a record.

Remarks

This method returns one of the following values:

  -1 or 0 An error occurred.
  1 OK button was pressed.
  2 Cancel button was pressed.

Example

The following example launches the specified editor dialog box for the record "0000012345":

Copy
View
Sub

    Dim iRet
    iRet = <SvcEditor>.View("0000012345", True)
    MsgBox iRet

End Sub

Back to top