Repository.ConnectToSQLRepository: Difference between revisions
Jump to navigation
Jump to search
Alex Ulanov (talk | contribs) No edit summary |
Kate Racaza (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
{{Template: | {{Template:APIBreadcrumb|9|Repository}} | ||
{{Template: | {{Template:API}} | ||
Connects to a SQL server repository that you specify. Returns a '''Boolean''' value; when true, indicates a successful connection to the repository. | |||
== Syntax == | == Syntax == | ||
''object''.'''ConnectToSQLRepository(''ServerName'', ''DatabaseName'', ''UseImpersonation'', ''ImpersonateDomain'', ''ImpersonateUsername'', ''ImpersonatePassword'')''' | |||
where ''object'' is a variable that represents a Repository object. | |||
{{ | ===Parameters=== | ||
{| {{APITable}} | |||
|- | |||
|ServerName{{APIParam|Required}}||'''String'''. The server file path for the SQL database. | |||
|- | |||
|DatabaseName{{APIParam|Required}}||'''String'''. The name of the database. | |||
|- | |||
|UseImpersonation{{APIParam|Optional}}||'''Boolean'''. When true, indicates that the database requires SQL impersonation. Default value is false. | |||
|- | |||
|ImpersonateDomain{{APIParam|Optional}}||'''String'''. The domain for the impersonation. | |||
|- | |||
|ImpersonateUsername{{APIParam|Optional}}||'''String'''. The account username for the impersonation. | |||
|- | |||
|ImpersonatePassword{{APIParam|Optional}}||'''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'''<br> | |||
{{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository | |||
MyRepository.ConnectToSQLRepository({{APIString|"C:\Program Files\Microsoft SQL Server\"}}, {{APIString|"MyEnterprise"}}) | |||
Revision as of 16:13, 13 July 2015
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")