Data Source Information Properties

OLE DB and SQL Server

OLE DB and SQL Server

Data Source Information Properties

In the provider-specific property set DBPROPSET_SQLSERVERDATASOURCEINFO, SQLOLEDB defines the following data source information properties.

Property ID Description
SSPROP_CHARACTERSET Type: VT_BSTR
R/W: R
Default: NULL
Description: The character set in the server. Apply to only Microsoft® SQL Server™ version 7.0 and earlier.
SSPROP_CURRENTCOLLATION Type: VT_BSTR
R/W: R
Default: NULL
Description: The current database collation name. Apply to only SQL Server 2000.
SSPROP_SORTORDER Type: VT_BSTR
R/W: R
Default: NULL
Description: The sort order in the server. Apply to only SQL Server 7.0 and earlier.
SSPROP_UNICODELCID Type: VT_I4
R/W: Read
Description: Unicode locale ID.

This is the locale used for Unicode data sorting. The value of this property is 0 for Microsoft SQL Server version 6.5.

SSPROP_UNICODECOMPARISONSTYLE Type: VT_I4
R/W: Read
Description: Unicode comparison style.

The sorting options used for Unicode data sorting. The value of this property is 0 for SQL Server 6.5.


In the provider-specific property set DBPROPSET_SQLSERVERSTREAM, SQLOLEDB defines the following additional properties.

Property ID Description
SSPROP_STREAM_BASEPATH Type: VT_BSTR
R/W: Read/Write
Description: Is used for resolving relative paths like XSL, mapping schema or external schema references in a template.
SSPROP_STREAM_CONTENTTYPE Type: VT_BSTR
R/W: Read Only
Description: If XSL is applied to the result, the media-type property on <xsl:output> in the XSL is returned as the value of this property.
SSPROP_STREAM_FLAGS Type: dword
R/W: Read/Write
Description: Following values can be assigned to this property (multiple values can be ORed together).

STREAM_FLAGS_DISALLOW_URL
No URL reference to any files is allowed.
For example, in a template you can specify XSL or mapping schema files. When STREAM_FLAGS_DISALLOW_URL value is set for the property, no URL references to these files is allowed in the templates.
URL references to files can slow down the performance and it is also a security risk because if it is not your server you may not be sure about the file content.

STREAM_FLAGS_DISALLOW_ABSOLUTE_PATH
No absolute path to files is allowed. The file path must be relative to the template in which the file is specified.
Absolute paths such as references to external sites are security risk. Therefore, STREAM_FLAGS_DISALLOW_ABSOLUTE_PATH is set to disallow absolute paths.

STREAM_FLAGS_DISALLOW_QUERY
No queries are allowed in the templates (for example, the <sql:query> tag is not allowed in a template). For security reasons you may not want to allow an SQL query in a template.

SSPROP_STREAM_MAPPINGSCHEMA Type: VT_BSTR
R/W: Read/Write
Description: Is used for specifying a schema for the XPath queries. The path specified can be relative or absolute.
If the path specified is relative, base path specified in SSPROP_STREAM_BASEPATH is used to resolve the relative path.
If the base path is not specified, the relative path is relative to the current directory.
SSPROP_STREAM_XMLROOT Type: VT_BSTR
R/W: Read/Write
Description: The result of a query (SQL or XPath) may not be a well-formed document. When this property is specified, the query result is wrapped in the root tag provided by this property to return a well formed document (if query is executed in the browser it may cause the browser to display parser errors when loading the result. To avoid the error, SQL ISAPI supports the keyword ROOT. This keyword maps to SSPROP_STREAM_XMLROOT property. For more information, see URL Access.)
SSPROP_STREAM_XSL Type: VT_BSTR
R/W: Read/Write
Description: Is used for specifying an XSL file. The path specified can be relative or absolute.
If the path specified is relative, the base path specified in SSPROP_STREAM_BASEPATH is used to resolve the relative path.
If the base path is not specified, the relative path is relative to the current directory.