Article ID: 276985 - Last Review: February 22, 2007 - Revision: 1.2

How To Use SQL Server CE OLE DB Provider-Specific Properties in eVB

This article was previously published under Q276985

On This Page

Expand all | Collapse all

SUMMARY

The OLE DB specification allows data providers to implement provider-specific properties. These properties allow the programmer to have access to functionality that is outside the boundaries of the OLE DB specification. The SQL CE Books Online topic SQL Server CE OLE DB Properties Reference describes OLE DB standard and provider-specific properties that are supported by SQL CE OLE DB Provider.

You can use a given property name (for example, DBPROP_INIT_DATASOURCE) in an eVC++ OLE DB application. The description of a property usually documents the name (for example, Data Source) you can use in an eVB ADOCE application. However, for provider-specific properties, you need to add the "SSCE:" prefix to the property description.

Provider-Defined Properties in DBPROPSET_SSCE_DBINIT

Collapse this tableExpand this table
Name (OLE DB)Description (ADOCE)
DBPROP_SSCE_DBPASSWORD SSCE:Database Password
DBPROP_SSCE_ENCRYPTDATABASESSCE:Encrypt Database

Provider-Defined Properties in DBPROPSET_SSCE_SESSION

Collapse this tableExpand this table
Name (OLE DB)Description (ADOCE)
DBPROP_SSCE_MAXBUFFERSIZESSCE:Max Buffer Size

MORE INFORMATION

For additional details on how to use database password and encryption properties, review the SQL CE Books Online topic Creating Secure Databases. You can specify these properties in the connection string as follows:
"provider=Microsoft.SQLSERVER.OLEDB.CE.1.0;data source=\secure.sdf; SSCE:Database Password='pass';SSCE:Encrypt Database=TRUE"
				
The SSCE:Max Buffer Size property specifies the largest amount of memory, in kilobytes, that SQL Server CE can use before it starts flushing changes to disk. You cannot specify this property in the connection string, or it will report an error. You can set this property after opening the connection, as follows:
    cn.Open "provider=MICROSOFT.SQLSERVER.OLEDB.CE.1.0; data source=\temp\ssce.db"
    
    cn.Properties("SSCE:Max Buffer Size") = 256  
				
To implement this in eVC++, review the SQL CE Books Online topic Session Properties.

REFERENCES

SQL CE Books Online topic SQL Server CE OLE DB Properties Reference.

APPLIES TO
  • Microsoft SQL Server 2000 Windows CE Edition
Keywords: 
kbhowto KB276985
Retired KB ArticleRetired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
 

Article Translations

 

Related Support Centers