Repository.ConnectToSQLRepository

From ReliaWiki
Revision as of 23:16, 16 July 2015 by Kate Racaza (talk | contribs)
Jump to navigation Jump to search
APIWiki.png


Member of: SynthesisAPI9Repository

Connects to a SQL server repository that you specify. Returns a Boolean value; when true, indicates a successful connection to the repository.

Syntax

object.ConnectToSQLRepository(ServerName, DatabaseName, UseImpersonation, ImpersonateDomain, ImpersonateUsername, ImpersonatePassword)

where object is a variable that represents a Repository object.

Parameters

Name Description
ServerNameborder="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse; text-align: left; cellborder"
Name Status String. The server file path for the SQL database.
DatabaseNameborder="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse; text-align: left; cellborder"
Name Status String. The name of the database.
UseImpersonationborder="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse; text-align: left; cellborder"
Name Status Boolean. When true, indicates that the database requires SQL impersonation. Default value is false.
ImpersonateDomainborder="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse; text-align: left; cellborder"
Name Status String. The domain for the impersonation.
ImpersonateUsernameborder="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse; text-align: left; cellborder"
Name Status String. The account username for the impersonation.
ImpersonatePasswordborder="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse; text-align: left; cellborder"
Name Status String. The account password for the impersonation.


Example

This example assumes that a SQL database named "MyEnterprise" exists in the C: drive. This code sample ignores the return value.

VB|VB.NET
Dim MyRepository As New Repository MyRepository.ConnectToSQLRepository("C:\Program Files\Microsoft SQL Server\", "MyEnterprise")