DB2®XsrObjectId structure

Represents an XML schema identifier. Encapsulates the long .NET data type.

Namespace:
IBM.Data.DB2Types
Assembly:
IBM.Data.DB2 (in IBM.Data.DB2.dll)

Syntax


[Visual Basic]
Public Structure DB2XsrObjectId
[C#]
public struct DB2XsrObjectId
[C++]
public value class DB2XsrObjectId

Remarks

The DB2XsrObjectId structure represents the schema identifier value that is returned from the XMLXSROBJECTID SQL function.

If you are connecting to Db2® for z/OS® servers, the DB2XsrObjectId structure can be specified for Db2 for z/OS Version 10 and later servers.

Example

[C#] The following example demonstrates how to use an DB2XsrObjectId instance. XmlReader.

[C#]
  public static string getProdData(DB2Connection conn)
  {
    String xmlString = "";
    DB2XsrObjectId xmlSchemaId;
    String cmdSQL = "SELECT description, XMLXSROBJECTID(description) FROM product";
    DB2Command cmd = new DB2Command(cmdSQL, conn);
    DB2DataReader reader = cmd.ExecuteReader();

    while (reader.Read())
    {
      DB2Xml description = reader.GetDB2Xml(0);
      xmlSchemaId = reader.GetDB2XsrObjectId(1);
      if (!xmlSchemaId.IsNull)
      {
        XmlSchemaSet sc = reader.GetXmlSchemaSet(xmlSchemaId);
      }
      xmlString += description.GetString();
    }
    reader.Close();

    return xmlString;
  }

Thread safety

Any public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Any instance members are not guaranteed to be thread safe.