Skip to content

Set database settings

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

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

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

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

VBScript

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