Saturday, February 25, 2012

C++ SSCE example

Hi

Does anyone have an example code in C++ to create a SSCE db and access data?

Many thanks

Ozzie

Install the developer tools SDK. You you find at the following location assuming default installation path.

C:\Program Files\Microsoft SQL Server Compact Edition\v3.1\SDK\Samples\NorthwindOleDb.zip

This is a device sample, but you can port it to desktop. Or you can copy paste code, the code for creating/opening and other database operations would be the same for device & desktop.

|||I have attempted to run the NorthwindOleDb project. The project builds without errors and when I start it it opens in the Pocket PC 2003 emulator but fails when trying to create the dialog to display employee info and fails at the line:
hr = InitDatabase();
I have SSCE dll's installed, the SSCE SDK and VS 2005 SP1. Any suggestions would be greatly appreciated. Im sure this should just work straight out of the box.

Ozzie

No comments:

Post a Comment