Chapter 7 Scripting PowerDesigner


Connecting to a Repository Database

Before you connect to the repository database using scripting, definitions of repositories must exist on your workstation, as you cannot define a new repository definition via the scripting feature.

To retrieve the current repository connection:

Use the following Description
RepositoryConnection As BaseObject Global property which manages the connection to the repository database

To connect to a repository database:

Use the following Description
Open (ByVal RepDef As String = "", ByVal User As String = "", ByVal Pass As String = "", ByVal DBUser As String = "", ByVal DBPass As String = "") As Boolean Method on RepositoryConnection that allows you to perform a repository connection

To disconnect from the repository:

Use the following Description
Close() Method on RepositoryConnection that allows you to disconnect from the repository database

You can connect to the Repository database using the following method on RepositoryConnection: Open(ByVal RepDef As String = "", ByVal User As String = "", ByVal Pass As String = "", ByVal DBUser As String = "", ByVal DBPass As String = "") As Boolean.

Example

Dim C
Set C = RepositoryConnection
C.Open

You disconnect from the repository database using the following method: Close().

Example

C.Close

 


Copyright (C) 2008. Sybase Inc. All rights reserved.