4
votes

Where is the SQL Server Compact Edition 4.0 SDK?


Bonus Reading

In order to create a database in SQL Server Compact Edition you must call the function ME_CreateDatabase exported from sqlceme40.dll:

enter image description here

The function is not documented on MSDN, and the header files do not ship with the redistributable (obviously).

MSDN mentions 3 Compact Edition header files:

  • sqlce_err.h: Error codes used by database
  • sqlce_oledb.h: OLEDB standard programming interfaces
  • sqlce_sync.h

That page also mentions that, if i had the SDK, the header files would be located in:

SQL Server Compact 4.0 header files are installed under %ProgramFiles%\Microsoft SQL Server Compact Edition\v4.0\Include.

But i don't, so they aren't:

enter image description here

So where is the SQL Server Compact Edition 4.0 SDK?


Bonus Chatter

From MSDN:

Building an OLE DB Application (SQL Server Compact)

The next step in building an OLE DB-enabled application is to include the appropriate header files. In the main entry point for your application, add include statements for the SQL Server Compact OLE DB provider and the SQL Server Compact error file:

#include <sqlce_oledb.h>
#include <sqlce_err.h  >
3
It seems to me that if ME_CreateDatabase is undocumented, it's probably designed to be called internally by the database engine. Am I missing something here? There are literally thousands of internal functions called by SQL Server CE 3.5 that aren't documented (because they're internal). Also, you provide a link in your opening paragraph that mentions nothing about the SDK being available. Where do you see that it is?Ken White
@KenWhite i added a 2nd link to the MSDN page that mentions the existance of the 4.0 SDK. Strictly speaking it looks like SSCE does something similar to GDI+: there is a flat API, but Microsoft provides header files that contain C++ code to wrap the flat API into classes. Since i'm using another native programming language, i'll be needing to translate the C/C++ header files into pascal.Ian Boyd
This MSDN forum page mentions installing VS 2010 SP1 + the SQL Server Compact 4.0 Visual Studio 2010 SP1 Tools.John Dewey
OK. I'm still a little lost, though. According to a link from the very page in your last comment, there's a CreateDatabase method that's used to "create a database" (so the ME_CreateDatabase is not needed after all). I see @JohnDewey solved the problem of the missing SDK headers, though. :) Maybe you could edit your question to remove all the extraneous noise and just ask about where to find the SQL Server CE 4.0 SDK?Ken White
@KenWhite i presume you mean this CreateDatabase method. Unfortunately that is not an API i can call. The reason i cannot call it is because it does not exist as an API.Ian Boyd

3 Answers

1
votes

The files are included in the package SSCE 4.0 Design Tools (SSCEVSTools-ENU.msi) (documented here). This executable is available on the Visual Studio 2012 Premium Edition DVD. Possibly in other editions and verisons as well, but this is the only one I have.

I needed the files myself and after digging around for an hour I found it there.

0
votes

As Nitramk posted, I found SSCEVSTools-ENU.msi on the VS 2012 iso's in packages\ssce40. It's also included in the 2012 Ultimate trial (and probably Pro). As of now, the trials are still available from MS. Search for "visual studio 2012 ultimate trial" or "visual studio 2012 trial".

Note that I don't see them in VS 2013 or 2015.

-1
votes

You have to use the 'Microsoft Web Platform Installer 3' link on the blog page and install that. Then you'll get the header files & samples installed into C:\Program Files (x86)\Microsoft SQL Server Compact Edition\v4.0