GetLastSchemaRepoInfo
Description
Returns schema repository information for the current connection.
It can be useful to save the schema repository connection info in a file. This is called a schema repository location file (that is, a tracking file). The name of this file is stored in the schema repository and whenever the schema repository location changes, the file is automatically updated. This method is used to retrieve information from the file.
new:
Returns information about the last database connection. This method returns the connection information for the default database set (or the most recently installed version if the default information is not available), which has the same name as the major version (for example, 2003.06.00). Also, see the GetLastSchemaRepoInfoByDbSet method, which requires a database set value (that is a database connection) as a parameter.
Syntax
VBScript
adminSession.GetLastSchemaRepoInfo
vendor, server, database, roLogin,
roPassword
Perl
$adminSession->GetLastSchemaRepoInfo
(vendor, server, database, roLogin,
roPassword);
- Identifier
- Description
- adminSession
- The AdminSession object representing the current schema repository access session.
- vendor
- A string containing the vendor type of the database.
- server
- A string containing the server name of the database.
- database
- A string containing the database name.
- roLogin
- A string containing the roLogin.
- roPassword
- A string containing the roPassword.
- Return value
- A Boolean whose value is True if the operation was successful, otherwise False.
Example
Perl
require "CQPerlExt.pm";
my $session = CQAdminSession::Build();
eval{$session->Logon("admin", "", "tst");};
if ($@){
print "Logon Exception: '$@'\n";
}
my $vendor = "";
my $server = "";
my $database = "";
my $roLogin = "";
my $roPassword = "";
print "get the stuff...\n";
eval{my $rt = $session->GetLastSchemaRepoInfo($vendor, $server, $database, $roLogin, $roPassword);};
#eval{my $rt = $session->GetLastSchemaRepoInfo(\$vendor, \$server, \$database, \$roLogin, \$roPassword);};
if ($@){
print "GetLastSchemaRepoInfo Exception: '$@'\n";
}
print "v: $vendor, s: $server, d: $database, r: $roLogin, rop: $roPassword\n";
CQAdminSession::Unbuild($session);