Repository.ConnectToSQLRepository

From ReliaWiki
Revision as of 17:23, 20 May 2015 by Alex Ulanov (talk | contribs)
Jump to navigation Jump to search


Connects to an MS SQL repository.

Syntax

  • ConnectToSQLRepository(ByVal ServerName As String, ByVal ByVal DatabaseName As String, Optional ByVal UseImpersonation As Boolean = False , Optional ByVal ImpersonateDomain As String = "", Optional ByVal ImpersonateUsername As String = "" , Optional ByVal ImpersonatePassword As String = "") As Boolean

Parameters

ServerName: The server file path for the SQL repository.
DatabaseName: The database name of the repository.
UseImpersonation: Whether the database requires impersonation.
ImpersonateDomain: The domain for the impersonation.
ImpersonateUsername: The User Name for the impersonation.
ImpersonatePassword: The Password for the impersonation.

Returns True if successful, otherwise returns False.

Usage Example

 'Declare a new repository connection object. 
 Dim MyRepository As New Repository
 
 'Connect to the Synthesis repository. 
 Dim Success As Boolean
 Success = MyRepository.ConnectToSQLRepository("SQLServerPath", "SQLDatabaseName")