Repository.ConnectToSQLRepository: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
{{Template:APIClass|Repository Class|Repository}}
{{Template:APIClass|Repository Class|Repository}}
{{Template:Repository.ConnectToSQLRepository.Cmt}}
{{Template:Repository.ConnectToSQLRepository.Cmt}} {{Template:BooleanReturn.Cmt}}


== Syntax ==
== Syntax ==

Revision as of 17:54, 27 February 2014


Connects to an MS SQL repository. Returns True if successful, otherwise returns False.

Syntax

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

Parameters

ServerName: The server file path for the SQL Repository.
DatabaseName: The Database name of the Synthesis Repository to connect.
UseImpersonation: The database requires impersonation.
ImpersonateDomain: The domain for the impersonation.
ImpersonateUsername: The User Name for the impersonation.
ImpersonatePassword: The Password for the impersonation.

Usage Example

Declare a new repository connection class.

       Private WithEvents MyRepository As New Repository

Connect to the Synthesis repository.

       Dim Success As Boolean = False
       Success = MyRepository.ConnectToSQLRepository("SQLServerPath", "SQLDatabaseName")