DB2®XsrObjectId structure
Represents an XML schema identifier. Encapsulates the long .NET data type.
- Namespace:
IBM.Data.
DB2
Types- Assembly:
IBM.Data.
(inDB2
IBM.Data.
)DB2
.dll
Syntax
[Visual Basic]
Public Structure DB2
XsrObjectId
[C#]
public struct DB2
XsrObjectId
[C++]
public value class DB2
XsrObjectId
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(DB2
Connection conn)
{
String xmlString = "";
DB2
XsrObjectId xmlSchemaId;
String cmdSQL = "SELECT description, XMLXSROBJECTID(description) FROM product";
DB2
Command cmd = new DB2
Command(cmdSQL, conn);
DB2
DataReader reader = cmd.ExecuteReader();
while (reader.Read())
{
DB2
Xml description = reader.GetDB2
Xml(0);
xmlSchemaId = reader.GetDB2
XsrObjectId(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.