ADODB Connection Object

You should be aware of several issues when using the ADODB.Connection object as an argument to DataSource.Open or DataSource.SaveTo. When calling DataSource.Open or DataSource.SaveTo without a Connection object, Publishing and Knowledge Management Collaboration Data Objects (PKMCDO) create a new Connection object internally. If you pass an existing Connection object to DataSource.Open or DataSource.SaveTo, either method will use the property values of the existing Connection object, which may not match with the default property values. This will result in unexpected behavior.

  • The Publishing and Knowledge Management Collaboration Data Objects (PKMCDO) expect non-canonicalized Absolute URLs on Datasource.Open and DataSource.SaveTo when a new internal Connection object is created. However, when passing an existing Connection object to the DataSource.Open or SaveTo methods, the behavior changes and canonicalized URLs are expected by default. When passing an existing Connection object and non-canonicalized URLs, set the URL Encoding property on the Connection object to DBPROPVAL_UE_URL_UNICODE (value is 1).

    Note

    Canonicalizing a URL refers to converting unsafe characters and spaces into escape sequences. For example, http://localhost/SharePoint/Documents/Hello there.doc becomes http://localhost/SharePoint/Documents/Hello%20there.doc

    For more information about canonicalization, see World Wide Web Consortium (W3C).

    ****Important   ****The previous link is not a Microsoft Web site. Microsoft is not responsible for the content of this Web site. Microsoft is not responsible for the validity of this link. The presence of this link does not constitute any endorsement by Microsoft.

  • PKMCDO prompts the user for authentication by default. There are two ways to turn off the prompt for authentication:

    On all objects, except the KnowledgeVersion object, set the PromptToAuthenticate property to VARIANT_FALSE.

    If you open an object using a Connection object, set the Prompt property on the Connection object to adPromptNever (value is 4).

  • If you need to change security credentials after WinInet has cached them, it is necessary to flush the WinInet credentials cache. Except for the KnowledgeVersion object, PKMCDO does not flush the WinInet cache by default. To learn how to flush the WinInet cache when passing a Connection object, see WinInet Caching.

  • PKMCDO does not inherit the properties of the connection when you pass it a connection object. Unless explicitly set, all properties are empty, or set with default values. For example, the connection will be Read-Only, which is the default value.

For more information about using the IDataSource interface, see Web Storage System.

Note

If you encounter a problem with the link for Microsoft Web Storage System, see Messaging and Collaboration.

SharePoint Portal Server Interface Implementations

See Also

Microsoft ActiveX Data Objects (from the platform SDK)