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 2: | Line 2: | ||
<onlyinclude>Connects to a SQL Server repository | <onlyinclude>Connects to a SQL Server repository. Returns a '''Boolean''' value; when true, indicates a successful connection to the repository.</onlyinclude> | ||
== Syntax == | == Syntax == | ||
Line 9: | Line 9: | ||
===Parameters=== | ===Parameters=== | ||
''ServerName'' | ''ServerName'' | ||
:String. The file path for the SQL Server. | :Required. String. The file path for the SQL Server. | ||
''DatabaseName'' | ''DatabaseName'' | ||
:String. The name of the database. | :Required. String. The name of the database. | ||
''UseImpersonation'' | ''UseImpersonation'' | ||
:Boolean. | :Optional. Boolean. Indicates whether the database requires impersonation. Default value is false. | ||
''ImpersonateDomain'' | ''ImpersonateDomain'' | ||
:String. The domain for the impersonation. | :Optional. String. The domain for the impersonation. | ||
''ImpersonateUsername'' | ''ImpersonateUsername'' | ||
:String. The account username for the impersonation. | :Optional. String. The account username for the impersonation. | ||
''ImpersonatePassword'' | ''ImpersonatePassword'' | ||
:String. The account password for the impersonation. | :Optional. String. The account password for the impersonation. | ||
Revision as of 15:31, 25 August 2015
Member of: SynthesisAPI9.Repository
Connects to a SQL Server repository. Returns a Boolean value; when true, indicates a successful connection to the repository.
Syntax
.ConnectToSQLRepository(ServerName, DatabaseName, UseImpersonation, ImpersonateDomain, ImpersonateUsername, ImpersonatePassword)
Parameters
ServerName
- Required. String. The file path for the SQL Server.
DatabaseName
- Required. String. The name of the database.
UseImpersonation
- Optional. Boolean. Indicates whether the database requires impersonation. Default value is false.
ImpersonateDomain
- Optional. String. The domain for the impersonation.
ImpersonateUsername
- Optional. String. The account username for the impersonation.
ImpersonatePassword
- Optional. String. The account password for the impersonation.
Example
This example assumes that a SQL Server database named "MyEnterprise" exists in the C: drive. The code ignores the return value.
VB|VB.NET Dim MyRepository As New Repository MyRepository.ConnectToSQLRepository("C:\Program Files\Microsoft SQL Server\", "MyEnterprise")