Repository.ConnectToSQLRepository: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
m (Protected "Repository.ConnectToSQLRepository" ([edit=sysop] (indefinite) [move=sysop] (indefinite)) [cascading])
No edit summary
Line 1: Line 1:
{{Template:APIClass|Repository Class|Repository}}
{{Template:APIClass|Repository Class|Repository}}
Connects to a SQL repository.
{{Template:Repository.ConnectToSQLRepository.Cmt}}
== Method Syntax ==
{{APIName|'''ConnectToSQLRepository'''(}}
{{APIPrefix|ByVal}}
{{APIName|ServerName}}
{{APIPrefix|As String, ByVal}}
{{APIName|DatabaseName}}
{{APIPrefix|As String, Optional ByVal}}
{{APIName|UseImpersonation}}
{{APIPrefix|As Boolean}}
=
{{APIPrefix|False, Optional ByVal}}
{{APIName|ImpersonateDomain}}
{{APIPrefix|As String}}
=
{{APIName|"",}}
{{APIPrefix|Optional ByVal}}
{{APIName|ImpersonateUsername}}
{{APIPrefix|As String}}
=
{{APIName|"",}}
{{APIPrefix|Optional ByVal}}
{{APIName|ImpersonatePassword}}
{{APIPrefix|As String}}
=
{{APIName|"")}}
{{APIPrefix|As Boolean}}<br>
{{APIComment|Connects to an MS SQL repository.}}


== Parameters ==
== Syntax ==
'''ServerName'''
*ConnectToSQLRepository( ServerName {{APIPrefix|As String}}, DatabaseName {{APIPrefix|As String}}, {{APIPrefix|Optional}} UseImpersonation {{APIPrefix|As Boolean}} = False , {{APIPrefix|Optional}} ImpersonateDomain {{APIPrefix|As String}} = "", {{APIPrefix|Optional}} ImpersonateUsername {{APIPrefix|As String}} = "" , {{APIPrefix|Optional}} ImpersonatePassword {{APIPrefix|As String}} = "") {{APIPrefix|As Boolean}}
The server file path for the SQL Repository.


'''DatabaseName'''
Parameters
The Database name of the Synthesis Repository to connect.
:''ServerName'': The server file path for the SQL Repository.


'''UseImpersonation'''
:''DatabaseName'': The Database name of the Synthesis Repository to connect.
The database requires impersonation.


'''ImpersonateDomain'''
:''UseImpersonation'': The database requires impersonation.
The domain for the impersonation.


'''ImpersonateUsername'''
:''ImpersonateDomain'': The domain for the impersonation.
The User Name for the impersonation.


'''ImpersonatePassword'''
:''ImpersonateUsername'': The User Name for the impersonation.
The Password for the impersonation.
 
:''ImpersonatePassword'': The Password for the impersonation.


== Usage Example ==
== Usage Example ==

Revision as of 17:06, 27 February 2014


Connects to an MS SQL repository.

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")