Partager via


DataSourceInformation Class

Allows you to retrieve well-defined information about a specified data source in the form of properties passed as name/value pairs.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Data.ObjectWithSite
    Microsoft.VisualStudio.Data.DataSourceInformation
      Microsoft.VisualStudio.Data.AdoDotNet.AdoDotNetDataSourceInformation

Namespace:  Microsoft.VisualStudio.Data
Assembly:  Microsoft.VisualStudio.Data (in Microsoft.VisualStudio.Data.dll)

Syntax

'Declaration
<GuidAttribute("EF852E1E-DD85-4400-A5BE-96A14F32B7E0")> _
Public Class DataSourceInformation _
    Inherits ObjectWithSite
[GuidAttribute("EF852E1E-DD85-4400-A5BE-96A14F32B7E0")]
public class DataSourceInformation : ObjectWithSite
[GuidAttribute(L"EF852E1E-DD85-4400-A5BE-96A14F32B7E0")]
public ref class DataSourceInformation : public ObjectWithSite
[<GuidAttribute("EF852E1E-DD85-4400-A5BE-96A14F32B7E0")>]
type DataSourceInformation =  
    class 
        inherit ObjectWithSite 
    end
public class DataSourceInformation extends ObjectWithSite

The DataSourceInformation type exposes the following members.

Constructors

  Name Description
Public method DataSourceInformation() Class constructor. Instantiates a nonparameterized instance of the DataSourceInformation class.
Public method DataSourceInformation(DataConnection) Class constructor. Instantiates a parameterized instance of the DataSourceInformation class that provides the data connection for which the information is provided.
Public method DataSourceInformation(DataConnection, ICollection) Class constructor. Instantiates a parameterized instance of the DataSourceInformation class, along with the specific connection and an ICollection object containing the connection property names..
Public method DataSourceInformation(DataConnection, IDictionary) Class constructor. Instantiates a parameterized instance of the DataSourceInformation class along with a specific data connection and an IDictionary object containing connection properties information.

Top

Properties

  Name Description
Protected property Connection Retrieves the data connection used to retrieve data source properties.
Protected property ConnectionSupport Retrieves the provider connection support object associated with the data connection.
Public property Item Retrieves a data source information property with the specified name.
Protected property ProviderObject Retrieves the underlying provider connection object as exposed by the connection support object.
Public property Site Retrieves or sets the object site. (Inherited from ObjectWithSite.)

Top

Methods

  Name Description
Protected method AddProperty(String) Adds a property to the list of supported properties.
Protected method AddProperty(String, Object) Adds a property and its value to the list of supported properties.
Public method Contains Retrieves a Boolean value indicating whether a specified property is contained in this data source information instance.
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method OnSiteChanged Raises the SiteChanged event. (Inherited from ObjectWithSite.)
Protected method RetrieveValue Retrieves a value for a specified data source information property.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Events

  Name Description
Public event SiteChanged Event that is raised when the Site property is changed. (Inherited from ObjectWithSite.)

Top

Fields

  Name Description
Public fieldStatic member CatalogInvalidCharacters Specifies the data source information property that provides a string of characters that are invalid, that is, that may not appear in a generic catalog name.
Public fieldStatic member CatalogInvalidStartCharacters Specifies the data source information property that provides a string of characters whose use at the start of a generic catalog name is not valid.
Public fieldStatic member CatalogIsSuffixed Specifies the data source information property that indicates if a catalog name is suffixed on a multi-part object identifier, as opposed to being a prefix.
Public fieldStatic member CatalogMaxLength Specifies the data source information property that indicates the maximum length of a catalog name.
Public fieldStatic member CatalogSeparator Specifies the data source information property that indicates the character separating a catalog name from the other parts in an object identifier.
Public fieldStatic member CatalogSupported Specifies the data source information property that indicates if a catalog name is supported in a multi-part object identifier.
Public fieldStatic member CatalogSupportedInDml Specifies the data source information property that indicates if a catalog name is supported in object identifiers that appear in SQL DML clauses.
Public fieldStatic member ColumnAliasInvalidCharacters Specifies the data source information property that provides a string of characters whose appearance in a column alias is not valid.
Public fieldStatic member ColumnAliasInvalidStartCharacters Specifies the data source information property that provides a string of characters whose appearance at the start of a column alias is not valid.
Public fieldStatic member ColumnAliasMaxLength Specifies the data source information property that indicates the maximum length of a column alias.
Public fieldStatic member ColumnAliasSupported Specifies the data source information property that indicates if a column alias is supported in a multi-part object identifier.
Public fieldStatic member ColumnInvalidCharacters Specifies the data source information property that provides a string of characters whose appearance in a column name is not valid.
Public fieldStatic member ColumnInvalidStartCharacters Specifies the data source information property that provides a string of characters whose appearance at the start of a column name is not valid.
Public fieldStatic member ColumnMaxLength Specifies the data source information property that indicates the maximum length of a column name.
Public fieldStatic member ColumnSupported Specifies the data source information property that indicates if a column name is supported in a multi-part object identifier.
Public fieldStatic member CommandDeriveParametersSupport Specifies what types of commands are supported by the DeriveParameters method.
Public fieldStatic member CommandDeriveSchemaSupport Specifies what types of commands are supported by the DeriveSchema method.
Public fieldStatic member CommandExecuteSupport Specifies what types of commands are supported by the Execute and ExecuteWithoutResults methods.
Public fieldStatic member CommandParameterSupport Specifies what parameter directions are supported.
Public fieldStatic member CommandPrepareSupport Specifies what types of commands are supported by the Prepare method.
Public fieldStatic member DataSourceCulture Specifies the geographical culture of the data source.
Public fieldStatic member DataSourceName Specifies the name of the data source.
Public fieldStatic member DataSourceProduct Specifies the name of the product of the data source.
Public fieldStatic member DataSourceVersion Specifies the version of the data source.
Public fieldStatic member DateLiteralPrefix Specifies the data source information property that provides the character(s) that prefix a date/time literal.
Public fieldStatic member DateLiteralSuffix Specifies the data source information property that provides the character(s) that suffix a date/time literal.
Public fieldStatic member Default Provides a default instance of the DataSourceInformation class for use when a data provider does not provide their own implementation.
Public fieldStatic member DefaultCatalog Specifies the data source information property that provides the name of the default catalog.
Public fieldStatic member DefaultSchema Specifies the data source information property that provides the name of the default schema.
Public fieldStatic member IdentifierCloseQuote Specifies the data source information property that provides the character used to close an identifier part that needs to be enclosed in quotation marks.
Public fieldStatic member IdentifierOpenQuote Specifies the data source information property that provides the character used to open an identifier part that needs to be quoted.
Public fieldStatic member IdentifierPartsCaseSensitive Specifies the data source information property that indicates if identifier parts are treated as case sensitive.
Public fieldStatic member IdentifierPartsStorageCase Specifies the data source information property that indicates what case identifier parts are stored in the data source.
Public fieldStatic member IndexInvalidCharacters Specifies the data source information property that provides a string of characters whose appearance as an index name is not valid.
Public fieldStatic member IndexInvalidStartCharacters Specifies the data source information property that provides a string of characters whose appearance at the start of an index name is not valid.
Public fieldStatic member IndexMaxLength Specifies the data source information property that indicates the maximum length of an index name.
Public fieldStatic member IndexSupported Specifies the data source information property that indicates if an index name is supported in a multi-part object identifier.
Public fieldStatic member LikeClausePercent Specifies the data source information property that indicates the wildcard character used to capture zero or more characters within values for a LIKE clause in a SQL DML statement.
Public fieldStatic member LikeClausePercentEscape Specifies the data source information property that indicates the character used to escape the LikeClausePercent character within values for a LIKE clause in a SQL DML statement.
Public fieldStatic member LikeClauseUnderscore Specifies the data source information property that indicates the wildcard character used to capture a single characters within values for a LIKE clause in a SQL DML statement.
Public fieldStatic member LikeClauseUnderscoreEscape Specifies the data source information property that indicates the character used to escape the LikeClauseUnderscore character within values for a LIKE clause in a SQL DML statement.
Public fieldStatic member ParameterPrefix Specifies the data source information property that provides the character used to prefix a parameter name.
Public fieldStatic member ParameterPrefixInName Specifies the data source information property that indicates if the parameter prefix should appear in the value set for the Name property.
Public fieldStatic member ProcedureInvalidCharacters Specifies the data source information property that provides a string of characters whose appearance in a procedure name is not valid.
Public fieldStatic member ProcedureInvalidStartCharacters Specifies the data source information property that provides a string of characters whose appearance at the start of a procedure name is not valid.
Public fieldStatic member ProcedureMaxLength Specifies the data source information property that indicates the maximum length of a procedure name.
Public fieldStatic member ProcedureSupported Specifies the data source information property that indicates if a procedure name is supported in a multi-part object identifier.
Public fieldStatic member QuotedIdentifierPartsCaseSensitive Specifies the data source information property that indicates if quoted identifier parts are treated as case sensitive.
Public fieldStatic member QuotedIdentifierPartsStorageCase Specifies the data source information property that indicates what case quoted identifier parts are stored in the data source.
Public fieldStatic member ReservedWords Specifies the data source information property that provides the set of reserved words on the data source.
Public fieldStatic member SchemaInvalidCharacters Specifies the data source information property that provides a string of characters whose appearance in a schema name is not valid.
Public fieldStatic member SchemaInvalidStartCharacters Specifies the data source information property that provides a string of characters whose appearance at the start of a schema name is not valid.
Public fieldStatic member SchemaMaxLength Specifies the data source information property that indicates the maximum length of a schema name.
Public fieldStatic member SchemaSeparator Specifies the data source information property that indicates the character separating a schema name from the other parts in an object identifier.
Public fieldStatic member SchemaSupported Specifies the data source information property that indicates if a schema name is supported in a multi-part object identifier.
Public fieldStatic member SchemaSupportedInDml Specifies the data source information property that indicates if a schema name is supported in object identifiers that appear in SQL DML clauses.
Public fieldStatic member ServerSeparator Specifies the data source information property that indicates the character separating a server name from the other parts in an object identifier.
Public fieldStatic member SupportsAnsi92Sql Specifies the data source information property that indicates if the data source supports the ANSI92 SQL standard.
Public fieldStatic member SupportsCommandTimeout Specifies the data source information property that indicates whether command timeouts are supported.
Public fieldStatic member SupportsNestedTransactions Specifies the data source information property that indicates whether transactions can be started, committed, or rolled back inside other transactions.
Public fieldStatic member SupportsQuotedIdentifierParts Specifies the data source information property that indicates whether quoted identifier parts are supported.
Public fieldStatic member SupportsVerifySql Specifies the data source information property that indicates if SQL verification is supported.
Public fieldStatic member TableAliasInvalidCharacters Specifies the data source information property that provides a string of characters whose appearance in a table alias is not valid.
Public fieldStatic member TableAliasInvalidStartCharacters Specifies the data source information property that provides a string of characters whose appearance at the start of a table alias is not valid.
Public fieldStatic member TableAliasMaxLength Specifies the data source information property that indicates the maximum length of a table alias.
Public fieldStatic member TableAliasSupported Specifies the data source information property that indicates if a table alias is supported in a multi-part object identifier.
Public fieldStatic member TableInvalidCharacters Specifies the data source information property that provides a string of characters whose appearance in a table name is not valid.
Public fieldStatic member TableInvalidStartCharacters Specifies the data source information property that provides a string of characters whose appearance at the start of a table name is not valid.
Public fieldStatic member TableMaxLength Specifies the data source information property that indicates the maximum length of a table name.
Public fieldStatic member TableSupported Specifies the data source information property that indicates if a table name is supported in a multi-part object identifier.
Public fieldStatic member UserInvalidCharacters Specifies the data source information property that provides a string of characters whose appearance in a user name is not valid.
Public fieldStatic member UserInvalidStartCharacters Specifies the data source information property that provides a string of characters whose appearance at the start of a user name is not valid.
Public fieldStatic member UserMaxLength Specifies the data source information property that indicates the maximum length of a user name.
Public fieldStatic member UserSupported Specifies the data source information property that indicates if a user name is supported in a multi-part object identifier.
Public fieldStatic member ViewInvalidCharacters Specifies the data source information property that provides a string of characters whose appearance in a view name is not valid.
Public fieldStatic member ViewInvalidStartCharacters Specifies the data source information property that provides a string of characters whose appearance at the start of a view name is not valid.
Public fieldStatic member ViewMaxLength Specifies the data source information property that indicates the maximum length of a view name.
Public fieldStatic member ViewSupported Specifies the data source information property that indicates if a view name is supported in a multi-part object identifier.

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method IObjectWithSite.GetSite Retrieves the last site set using the IObjectWithSite.SetSite method. In cases where there is no known site, the object returns an exception. (Inherited from ObjectWithSite.)
Explicit interface implemetationPrivate method IObjectWithSite.SetSite Provides the site's pointer to the site object. (Inherited from ObjectWithSite.)

Top

Remarks

This class contains a set of constant strings that indicate the names of well known data source information properties. A data provider is welcome to add more properties to their implementation but these will not be used generically.

The base class implementation, by default, reads properties and property values from the registry that are specified in a DataSourceInformation key, under SupportedObjects, if any. This provides an easy way to specify static data source information property values.

Thread Safety

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

See Also

Reference

Microsoft.VisualStudio.Data Namespace