# Set database settings

> Defines the database settings and connection method used by the SDK.

Source: https://docs.capaone.com/capainstaller/sdk-capainstaller-software-development-kit-functions/container-functions/set-database-settings/  
Product: CapaInstaller — a separate CapaSystems product; do not apply this page to any other.

## Description

This function is used to define database settings and connection methods.

## Syntax

SetDatabaseSettings(Byval Server as String, Byval Database as String, Byval SQLServerAuthentication as Boolean, Optional Byval UserName as String = "", Optional Byval Password as String = "") as Boolean

## Parameters

*Server (String)*

The server you want to connect to

*Database (String)*

The database you want to open

*SQLServerAuthentication (Boolean)*

True if you want to connect using username and password

False if you want to connect using Windows Authentication

*UserName (String)*

The name of the account to connect with

*Password (String)*

The password corresponding to the above username

## Return value

Returns a boolean value. True if succeded, false if not.

## Example

**VBScript**

```vb
Dim bStatus 
Dim oCMS 
  
Set oCMS = CreateObject("CapaInstaller.SDK") 
bStatus = oCMS.SetDatabaseSettings("WSTST10","CMS",False) 
or 
bStatus = oCMS.SetDatabaseSettings("WSTST10","CMS",True,"sa","test")
```
