CloseDbCommand

Syntax

bool CloseDbCommand(DbCommandId tDbCommand)

Parameters

tDbCommand. SQL repository object moniker.

Description

The CloseDbCommand operation closes the opened SQL object instance.

Comments

To execute the operation, in the tDbCommand field specify the moniker of the SQL object instance to be closed. The moniker can be obtained on executing the OpenDbCommand operation. The operation results in the logical True if the object was closed successfully.

Example

The example of closing the SQL instance. The request contains SQL object moniker. The response returns whether the closing is 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">
<CloseDbCommand xmlns="http://www.fsight.ru/PP.SOM.Som">
<tDbCommand xmlns="">
  <id>S1!M!S!M1</id>
  </tDbCommand>
  </CloseDbCommand>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
  <CloseDbCommandResult 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</CloseDbCommandResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"CloseDbCommand" :
{
"tDbCommand" :
{
"id" : "S1!M!S!M1"
}
}
}

JSON response:

{
"CloseDbCommandResult" : "1"
}
public static bool CloseSQLObject(DbCommandId moniker)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tClose = new CloseDbCommand()
{
tDbCommand = moniker
};
//Close SQL object instance
var b = somClient.CloseDbCommand(tClose);
return b;
}

See also:

Working with SQL Objects of Repository