DatabaseResult EditDatabase(OdId tOb)
tOb. Moniker of repository object that is database.
The EditDatabase operation opens database settings for edit.
To execute the operation, in the tOb field specify moniker of the repository object that is a database. The object moniker can be obtained on executing the GetObjects operation.
The operation results in the moniker of opened database instance and the obtained settings. Further work with the opened database instance is executed using the GetDadatabase and SetDatabase operations.
Below is the example of opening database settings for edit. The request contains database moniker in the repository. The response contains the moniker of database instance opened for edit and its basic settings.
The example uses the FindObjectById function, which code is given in the Getting Object Description by Its Identifier example.
{
"EditDatabase" :
{
"tOb" :
{
"id" : "GDDDOLIINILHGOAEPLFHMCEACBLGJGHEAKHGLPEKDKEIIJNJ!M!52"
}
}
}
{
"EditDatabaseResult" :
{
"id" :
{
"id" : "GDDDOLIINILHGOAEPLFHMCEACBLGJGHEAKHGLPEKDKEIIJNJ!M!S!DBIALLMOIINILHGOAECHBKDNKMKACIHBJEKJCOGGHCHELNAFOP"
},
"meta" :
{
"obInst" :
{
"obDesc" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "3",
"@hf" : "0",
"i" : "DB",
"n" : "Database",
"k" : "52",
"c" : "513",
"p" : "712",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0",
"isPermanent" : "1",
"isTemp" : "0"
}
},
"dirty" : "0",
"connectionParams" :
{
"useMetabaseLogonData" : "1",
"user" : "WAREHOUSE",
"pass" : "1",
"logonDataExt" :
{
"driver" : "POSTGRES",
"server" : "10.10.10.10",
"database" : "WAREHOUSE",
"schema" : "public",
"unicode" : "1",
"authentication" : "Password",
"caseSensitive" : "0",
"useGSSAPI" : "0",
"KerberosServiceName" : "",
"sslMode" : "2",
"serverCursorsDisabled" : "0",
"logonTask" :
{
"obDesc" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "6",
"@hf" : "0",
"i" : "PREPARE_DB",
"n" : "Prepare connection",
"k" : "134",
"c" : "1537",
"p" : "51",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0"
},
"subName" : "PrepareDB.OnDBConnecting"
},
"webServiceLogon" : "0"
},
"useUnicode" : "0",
"loginPrompt" : "0",
"useMetabaseCredentials" : "1",
"autoAdjustRights" : "1",
"useApplicationRole" : "0",
"supportDecimal" : "0",
"supportBinaryProtocol" : "1"
}
}
}
}
public static DatabaseResult EditDatabase(MbId mb, string id)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tEdit = new EditDatabase()
{
tOb = new OdId() { id = mb.id + "!" + FindObjectById(mb, id).k }
};
// Open database for edit
var tResult = somClient.EditDatabase(tEdit);
return tResult;
}
See also: