Building OLE DB applications for SQL Server CE 1.1, SQL Server CE 2.0, and Windows CE .NET (825393)
The information in this article applies to:
- Microsoft SQL Server 2000 Windows CE Edition 2.0
- Microsoft SQL Server 2000 Windows CE Edition 1.1 SP1 Update
SUMMARYThis article discusses the location and the use of a new
header file, Ssceoledb.h. You use the Ssceoledb.h file when you build Microsoft
SQL Server CE 1.1 and 2.0 OLEDB applications on Microsoft Windows .NET
devices.MORE INFORMATIONThe new header file, Ssceoledb.h (for SQL Server CE 1.1
Service Pack 1 and SQL Server CE 2.0), is an integration of the Oledb.h file,
the Oledb.lib file, and the previous Ssceoledb.h file. For example, to
build the NorthWindOLEDB sample application for Microsoft Windows Powered
Pocket PC 2003 under Microsoft eMbedded Visual C++4.0 Service Pack 2), follow
these steps:
- Dowload and expand the Ssceoledb.h file from the Microsoft
Web site that is in the "Download Information" topic.
- Copy the Ssceoledb.h file to a folder where the eMbedded
Visual C++ project can include it.
- Create a new eMbedded Visual C++4.0 project, and then copy
the files from the NorthWindOLEDB sample that is located in C:\Program
Files\Microsoft SQL Server CE 2.0\Samples\eVC\NorthwindOleDb.
- Include the new Ssceoledb.h header file in the copy, and
then follow these steps:
- Remove all references to the Oledb.h file by removing
the "#include <oledb.h>" line from the application's source
files.
- Remove the Oledb.lib file from your link libraries
list.
- Remove symbols like DBINITCONSTANTS, OLEDBVER, and
INITGUID from your source code.
- Make sure that you include the Ole32.lib, Oleaut32.lib,
and the Uuid.lib files in your link library list under Project
Settings.
- Make sure to call the following function before calling
these OLE DB methods:
CoInitializeEx(NULL, COINIT_MULTITHREADED);
If you receive a build error with your new project, compare
your code and your settings with those from the NorthwindOLEDB sample for
troubleshooting purposes. If an error occurs with your program at run
time, add OLE DB error checking. For more information about OLE DB errors, see
the "Using OLE DB Error Objects" topic in SQL Server CE 2.0 Books Online. Download Information The
following file is available for download from the Microsoft Download
Center: Ssceoledb.exe Release
Date: SEP-05-2003 For additional information about how to download
Microsoft Support files, click the following article number to view the article
in the Microsoft Knowledge Base: 119591 How to Obtain Microsoft Support Files from Online Services
Microsoft scanned this file for viruses. Microsoft used the most
current virus-detection software that was available on the date that the file
was posted. The file is stored on security-enhanced servers that help to
prevent any unauthorized changes to the file.
Microsoft eMbedded Visual C++4.0 Service Pack 2With Microsoft eMbedded Visual C++ 4.0 Service Pack 2 (SP2),
eMbedded Visual C++ 4.0 users can target Microsoft Windows CE .NET 4.0, 4.1 and
4.2 devices. You must install the eMbedded Visual C++ 4.0 SP2 version on top of
existing eMbedded Visual C++ 4.0 installations. To download eMbedded Visual C++
4.0 SP2, visit the following Microsoft Web site: http://www.microsoft.com/downloads/details.aspx?FamilyID=ce7f1aaa-54eb-4989-812b-7f955605dcb8&DisplayLang=en
Modification Type: | Minor | Last Reviewed: | 1/16/2006 |
---|
Keywords: | kbHotfixServer kbQFE kbfile kbinfo KB825393 kbAudDeveloper |
---|
|