How to use Stored Procedure in SqlCE

Vaibhav Jain picture Vaibhav Jain · Jan 16, 2010 · Viewed 21.3k times · Source

I have just installed Sql Server Compact Edition. To my surprise, we can't use stored procedure in sql server CE. Do I have any alternative of Stored Procedure in Sql Server CE. I am strongly obsessed with stored procedure, I can'nt think of an application without stored procedures.

Please help, Thanks in advance.

Edit: Can I use Managed Stored Procedures.

Answer

AMissico picture AMissico · Jan 16, 2010

SqlCe is a local database for use by an application. There is no need for stored procedures since the database is just a local data store, and the business logic is in the application. It is not an engine. If you need an engine then use SqlExpress or its big brother. See Steve Lasker's Comparing SQL Server Express and Compact Editions Whitepaper at http://download.microsoft.com/download/A/4/7/A47B7B0E-976D-4F49-B15D-F02ADE638EBE/Compact_Express_Comparison.doc. It explains everything you need to know.

No, you cannot use managed stored procedures. SqlCe is in-process.

Also, you might find Data Storage Architecture with SQL Server 2005 Compact Edition at http://msdn.microsoft.com/en-us/library/bb380177(SQL.90).aspx helpful.