Repository.Project.SetCurrentProject: Difference between revisions
Jump to navigation
Jump to search
Kate Racaza (talk | contribs) No edit summary |
Kate Racaza (talk | contribs) No edit summary |
||
(12 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Template: | {{Template:API}}{{Template:APIBreadcrumb|.[[Repository Class|Repository]]}} | ||
{{Template: | |||
<onlyinclude>Sets the current (active) project for the repository. Returns a '''Boolean''' value; when true, indicates a successful connection to that project.</onlyinclude> | |||
== Syntax == | == Syntax == | ||
' | '''.Project.SetCurrentProject'''(''ProjectID'') | ||
=== Parameters === | === Parameters === | ||
''ProjectID'' | |||
:Required. Integer. The ID number of the project. | |||
== Example == | == Example == | ||
'''VBA|VB.NET''' | '''VBA|VB.NET''' | ||
{{APIComment|'Declare a new Repository object and connect to a Synthesis repository.}} | |||
{{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository | {{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository | ||
MyRepository.ConnectToAccessRepository({{APIString|"C:\RSRepository1.rsr10"}}) | |||
{{APIComment|'Set the first project in the repository as the current project | |||
{{APIComment|'Set the first available project in the repository as the current project.}} | |||
MyRepository.Project.SetCurrentProject(1) |
Latest revision as of 15:29, 9 June 2016
Member of: SynthesisAPI.Repository
Sets the current (active) project for the repository. Returns a Boolean value; when true, indicates a successful connection to that project.
Syntax
.Project.SetCurrentProject(ProjectID)
Parameters
ProjectID
- Required. Integer. The ID number of the project.
Example
VBA|VB.NET 'Declare a new Repository object and connect to a Synthesis repository. Dim MyRepository As New Repository MyRepository.ConnectToAccessRepository("C:\RSRepository1.rsr10") 'Set the first available project in the repository as the current project. MyRepository.Project.SetCurrentProject(1)