ExternalDatabaseConnection.AutoSave

This property returns/sets if this object should automatically save changes as they are made.

Syntax Parameters Return Value
- - Boolean

SVB Example

Adding an external data source:

Sub Main
    Dim oOM As ObjectManager

    'Reconnect into Enterprise ObjectManager
    Set oOM = New ObjectManager
    oOM.Reconnect Application

    Dim createDBSourceInfo As New ExternalDatabaseConnectionCreateInfo
    Dim dbSource As ExternalDatabaseConnection

    'Create an external data connection to a Statistica spreadsheet
    createDBSourceInfo.Name = "Cat Clinic"
    createDBSourceInfo.AuditLogReason = "Adding Cat Clinic Data Source"
    createDBSourceInfo.ConnectionString = _
        "Provider=STATISTICA.StaOLEDB.1;Data Source=""" & Application.Path & "\Examples\Datasets\Cat Clinic.sta;"";Integrated Security=True"
    'Add the data connection to the system
    Set dbSource = oOM.ExternalDatabaseConnections.AddEx(createDBSourceInfo)

    'Edit the description to it after we created it
    dbSource.AutoSave = False
    dbSource.Description = "Cat clinic data, which includes measurements and some categorical information of its patients."
    Dim dbUpdateInfo As New ExternalDatabaseConnectionUpdateInfo
    dbUpdateInfo.AuditLogReason = "Just adding a description"
    dbSource.SaveEx(dbUpdateInfo)

    oOM.Disconnect

End Sub