Repository.ConnectToSQLRepository: Difference between revisions
Jump to navigation
Jump to search
Kate Racaza (talk | contribs) No edit summary |
Kate Racaza (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
{{Template: | <noinclude>{{Template:API}}{{Template:APIBreadcrumb|9|Repository}}</noinclude> | ||
{{Template: | |||
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. | ||
<noinclude> | |||
== Syntax == | == Syntax == | ||
''object''.'''ConnectToSQLRepository(''ServerName'', ''DatabaseName'', ''UseImpersonation'', ''ImpersonateDomain'', ''ImpersonateUsername'', ''ImpersonatePassword'')''' | ''object''.'''ConnectToSQLRepository(''ServerName'', ''DatabaseName'', ''UseImpersonation'', ''ImpersonateDomain'', ''ImpersonateUsername'', ''ImpersonatePassword'')''' | ||
Line 31: | Line 30: | ||
{{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository | {{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository | ||
MyRepository.ConnectToSQLRepository({{APIString|"C:\Program Files\Microsoft SQL Server\"}}, {{APIString|"MyEnterprise"}}) | MyRepository.ConnectToSQLRepository({{APIString|"C:\Program Files\Microsoft SQL Server\"}}, {{APIString|"MyEnterprise"}}) | ||
</noinclude> |
Revision as of 23:16, 16 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")