Repository.ConnectToSQLRepository: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
<noinclude>{{Template:API}}{{Template:APIBreadcrumb|9|Repository}}</noinclude>
<noinclude>{{Template:API}}{{Template:APIBreadcrumb|9|[[Repository Class|Repository]]}}</noinclude>


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

Revision as of 17:26, 17 July 2015

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")