Content Type Property

ADO and SQL Server

ADO and SQL Server

Content Type Property

The Content Type property returns the output content type of an XML transmission.

Applies To
Command Object
Syntax

object.Properties("Content Type")

Parts

object

Expression that evaluates to an object in the Applies To list.

Data Type

adBSTR

Modifiable

Read-only

OLE DB Property

SSPROP_STREAM_CONTENTTYPE

Returns
Value Description
image/jpeg Indicates that image is the general type and JPEG is the specific format of the data.
text/html Indicates that text is the general type and HTML is the specific format of the data.
text/XML Default. Indicates that text is the general type and XML is the specific format of the data.

Remarks

The value returned by the Content Type property describes the data contained in the body fully enough that the receiving agent, or Web browser, can pick an appropriate mechanism to present the data to the user.

Content Type provides the content-type and the subtype, which describes the nature of the data. The content-type (such as text, image, audio, video, and so on) describes the general type of data, and the subtype specifies a specific format for that type of data.

The value returned by Content Type becomes the content-type field that is sent to the browser as part of the HTTP header, which contains the MIME-type (Multipurpose Internet Mail Extensions) of the document being sent as the body.

When a query specifies a Microsoft® SQL Server™ BLOB field (for example, a JPEG image), Content Type returns image/jpeg. Many BLOB types have corresponding MIME types. A full list of registered MIME types is maintained by IANA (Internet Assigned Numbers Authority).

See Also

Base Path Property

Mapping Schema Property

SS STREAM FLAGS Property

URL Access

XML Root Property

XSL Property