Repository.ConnectToSQLRepository: Difference between revisions
Jump to navigation
Jump to search
Alex Ulanov (talk | contribs) No edit summary |
Alex Ulanov (talk | contribs) No edit summary |
||
Line 3: | Line 3: | ||
== Syntax == | == Syntax == | ||
*ConnectToSQLRepository({{APIPrefix|ByVal}} ServerName {{APIPrefix|As String}}, | *ConnectToSQLRepository({{APIPrefix|ByVal}} ServerName {{APIPrefix|As String}}, {{APIPrefix|ByVal}} DatabaseName {{APIPrefix|As String}}, {{APIPrefix|Optional}} {{APIPrefix|ByVal}} UseImpersonation {{APIPrefix|As Boolean}} = False , {{APIPrefix|Optional}} {{APIPrefix|ByVal}} ImpersonateDomain {{APIPrefix|As String}} = "", {{APIPrefix|Optional}} {{APIPrefix|ByVal}} ImpersonateUsername {{APIPrefix|As String}} = "" , {{APIPrefix|Optional}} {{APIPrefix|ByVal}} ImpersonatePassword {{APIPrefix|As String}} = "") {{APIPrefix|As Boolean}} | ||
Parameters | Parameters |
Revision as of 17:23, 20 May 2015
Connects to an MS SQL repository.
Syntax
- ConnectToSQLRepository(ByVal ServerName As String, 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")