Repository.ConnectToSQLRepository: Difference between revisions
Jump to navigation
Jump to search
Chris Kahn (talk | contribs) (→Syntax) |
Chris Kahn (talk | contribs) No edit summary |
||
Line 20: | Line 20: | ||
== Usage Example == | == Usage Example == | ||
{{APIComment|Declare a new repository connection class.}} | {{APIComment|'Declare a new repository connection class.}} | ||
Dim MyRepository As New Repository | |||
{{APIComment|Connect to the Synthesis repository.}} | {{APIComment|'Connect to the Synthesis repository.}} | ||
Dim Success As Boolean = False | |||
Success = MyRepository.ConnectToSQLRepository("SQLServerPath", "SQLDatabaseName") |
Revision as of 21:30, 23 May 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 to.
- 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.
Usage Example
'Declare a new repository connection class. Dim MyRepository As New Repository 'Connect to the Synthesis repository. Dim Success As Boolean = False Success = MyRepository.ConnectToSQLRepository("SQLServerPath", "SQLDatabaseName")