?
Solved

Linked Server to Compact Edition possible in 2005 Express?

Posted on 2009-05-08
3
Medium Priority
?
783 Views
Last Modified: 2012-05-06
Hello

I am running SQL Server 2005 Express.  There is a third party app on the system that uses Microsoft SQL Server Compact Edition (using a file with an .SDF extension)

Is it possible for me to point to this as a linked server within SQL Server Management Studio? If so, how? I see no "Compact Edition" in the list of datasource types when trying to setup the linked server.

Additionally, if not, is it possible to set it up as an ODBC source?

Thanks
0
Comment
Question by:PMH4514
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 51

Expert Comment

by:Mark Wills
ID: 24342931
Nope, not a linked server, but you can "connect" to it by simply bringing up the connection manager and browse for that SDF file.  Compact is not a server based solution, so is handled a bit differently...

What you have to do is write a bit of code and link to it that way...

What exactly are you trying to do ?
0
 

Author Comment

by:PMH4514
ID: 24343700
I am trying to insert into it from within a SQL Server stored procedure. The vendor of this third party component that plays a role in my system previously used an MS Access database, and my stored procedures insert directly into it as a linked server. Now they have changed and I guess I have to as well. It all needs to be programmatic, during runtime, can't be opening dialogs and manually browsing for anything. I don't see an ODBC driver for it either so I can't even write a C++  module to do it programmaticly it seems.
0
 
LVL 51

Accepted Solution

by:
Mark Wills earned 500 total points
ID: 24343788
ADO.net using the SQLCE components. You will need to add the SQLCE OLEDB stuff to your project...

You can also use entity framework : http://technet.microsoft.com/en-us/library/cc835494.aspx

There is a nice little project with source code converting / migrating data from SQL Server to Compact - it has all the connections and code samples... http://www.codeproject.com/KB/database/SqlCompactCoptUtility.aspx   (points to the same johnnycantcode link in the other thread below)

You can also explore SQLCE_OLEDB : http://msdn.microsoft.com/en-us/library/ms171763.aspx

And here is a previous / related posting : http://www.experts-exchange.com/Programming/Editors_IDEs/.NET/Q_24214228.html
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently, when I was asked to create a new SQL 2005 cluster, Microsoft released a new service pack for MS SQL 2005 what is Service Pack 3. When I finished the installation of MS SQL 2005 I found myself troubled why the installation of SP3 failed …
When writing XML code a very difficult part is when we like to remove all the elements or attributes from the XML that have no data. I would like to share a set of recursive MSSQL stored procedures that I have made to remove those elements from …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question