FIX: SQL Server CE OLE DB Provider Specific Properties Give Compilation Error (307530)



The information in this article applies to:

  • Microsoft SQL Server 2000 Windows CE Edition 1.1
  • Microsoft SQL Server 2000 Windows CE Edition

This article was previously published under Q307530

SYMPTOMS

An attempt to use a Microsoft SQL Server 2000 Windows CE Edition (SQL Server CE) provider specific property in a Microsoft embedded Visual C++ OLE DB program causes a compilation error. For example, if you try to create a password-protected database through OLE DB, and you pass the DBPROP_SSCEOLEDB_DBPASSWORD provider-specific property, the following error message occurs:
error C2065: 'DBPROP_SSCEOLEDB_DBPASSWORD' : undeclared identifier

CAUSE

SQL Server 2000 Windows CE 1.x Books Online has a typographical error where it lists the provider-specific properties as DBPROP[SET]_SSCEOLEDB_xxx, which is different from the properties defined in the ssceoledb.h header file.

RESOLUTION

SQL Server Books Online for Microsoft SQL Server 2000 Windows CE 2.0 contains the correct information.

The correct properties are DBPROP[SET]_SSCE_xxx. In each case, you need to change the middle part of "_SSCEOLEDB_" to "_SSCE_" to agree with the properties defined in the ssceoledb.h header file.

MORE INFORMATION

Here are the correct properties to use to create an encrypted database through OLE DB:

DBPROP_SSCE_DBPASSWORD

DBPROP_SSCE_ENCRYPTDATABASE

Look up the header file, ssceoledb.h, if a compilation error occurs for the provider-specific property you are using. By default, the ssceoledb.h file is located in the C:\Program Files\Microsoft SQL Server CE\Inc folder.

REFERENCES

SQL Server CE Books Online; topics: "SQL Server CE OLE DB Properties Reference"; "Creating and Accessing a SQL Server CE Database, Creating Secure Databases, OLE DB"

Modification Type:MinorLast Reviewed:8/25/2005
Keywords:kbprb KB307530