CloseDatabase

Syntax

bool CloseDatabase(OdId tOb)

Parameters

tOb. Opened database instance moniker.

Description

The CloseDatabase operation closes opened database instance.

Comments

To execute the operation, in the tOb field specify database instance moniker to be closed. The operation results in the logical True if the object was closed successfully.

Example

The example of closing database instance. The request contains moniker of opened database instance. The response returns whether closing was successful.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<CloseDatabase xmlns="http://www.fsight.ru/PP.SOM.Som">
<tOb xmlns="">
  <id>S1!M!S!DB4</id>
  </tOb>
  </CloseDatabase>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
  <CloseDatabaseResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">1</CloseDatabaseResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"CloseDatabase" :
{
"tOb" :
{
"id" : "S1!M!S!DB4"
}
}
}

JSON response:

{
"CloseDatabaseResult" : "1"
}
public static bool CloseDB(string moniker)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tClose = new CloseDatabase()
{
tOb = new OdId() { id = moniker }
};
//Close database instance
var b = somClient.CloseDatabase(tClose);
return b;
}

See also:

Working with Relational Objects of Repository