Repository.ConnectToSQLRepository: Difference between revisions
Jump to navigation
Jump to search
Kate Racaza (talk | contribs) No edit summary |
Kate Racaza (talk | contribs) No edit summary |
||
Line 2: | Line 2: | ||
<onlyinclude>Connects to a SQL | <onlyinclude>Connects to a SQL Server repository that you specify. Returns a '''Boolean''' value; when true, indicates a successful connection to the repository.</onlyinclude> | ||
== Syntax == | == Syntax == | ||
Line 9: | Line 9: | ||
===Parameters=== | ===Parameters=== | ||
''ServerName'' | ''ServerName'' | ||
:String. The | :String. The file path for the SQL Server.(Required) | ||
''DatabaseName'' | ''DatabaseName'' | ||
Line 15: | Line 15: | ||
''UseImpersonation'' | ''UseImpersonation'' | ||
:Boolean. When true, indicates that the database requires | :Boolean. When true, indicates that the database requires impersonation. Default value is false. (Optional) | ||
''ImpersonateDomain'' | ''ImpersonateDomain'' | ||
Line 28: | Line 28: | ||
==Example== | ==Example== | ||
This example assumes that a SQL database named "MyEnterprise" exists in the C: drive. The code ignores the return value. | This example assumes that a SQL Server database named "MyEnterprise" exists in the C: drive. The code ignores the return value. | ||
'''VB|VB.NET''' | '''VB|VB.NET''' | ||
{{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository | {{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository | ||
MyRepository.ConnectToSQLRepository({{APIString|"C:\Program Files\Microsoft SQL Server\"}}, {{APIString|"MyEnterprise"}}) | MyRepository.ConnectToSQLRepository({{APIString|"C:\Program Files\Microsoft SQL Server\"}}, {{APIString|"MyEnterprise"}}) |
Revision as of 16:34, 18 August 2015
Member of: SynthesisAPI9.Repository
Connects to a SQL Server repository that you specify. Returns a Boolean value; when true, indicates a successful connection to the repository.
Syntax
.ConnectToSQLRepository(ServerName, DatabaseName, UseImpersonation, ImpersonateDomain, ImpersonateUsername, ImpersonatePassword)
Parameters
ServerName
- String. The file path for the SQL Server.(Required)
DatabaseName
- String. The name of the database. (Required)
UseImpersonation
- Boolean. When true, indicates that the database requires impersonation. Default value is false. (Optional)
ImpersonateDomain
- String. The domain for the impersonation. (Optional)
ImpersonateUsername
- String. The account username for the impersonation. (Optional)
ImpersonatePassword
- String. The account password for the impersonation. (Optional)
Example
This example assumes that a SQL Server database named "MyEnterprise" exists in the C: drive. The code ignores the return value.
VB|VB.NET Dim MyRepository As New Repository MyRepository.ConnectToSQLRepository("C:\Program Files\Microsoft SQL Server\", "MyEnterprise")