DB2 10.5 for Linux, UNIX, and Windows

DB2Connection.GetDTD Method

Gets the DTD registered with the database.

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

Syntax

[Visual Basic]
Public Sub GetDTD(
   ByVal schema As String,
   ByVal name As String
) As String

[C#]
public String GetDTD(
   String schema,
   String name
);

[C++]
public: String GetDTD(
   String schema,
   String name
);

[JScript]
public function GetDTD(
   schema : String,
   name : String
) : String;

Parameters

schema
Name of the schema containing the registered DTD.
name
Name of the DTD.

Example

The following C# code example demonstrate use of the GetDTD method:
//HeadCount.dtd was registered in this example
using (DB2Connection conn = new DB2Connection(connStr))
{
	try 
	{
		conn.Open();
		String dtdContent = conn.GetDTD("NEWTON", "HEADCOUNTDTD");
	}
	catch (Exception e)
	{
		// exception handling
	}
}

Return value

Function returns the content of DTD.