Solved

Linked Server to Compact Edition possible in 2005 Express?

Posted on 2009-05-08
3
763 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
  • 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 125 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Record open by another user 6 58
passing parameter in sql procedure 9 61
ms sql + top 1 for each customer 3 49
SQL Server Insert where not exists 24 41
There are some very powerful Data Management Views (DMV's) introduced with SQL 2005. The two in particular that we are going to discuss are sys.dm_db_index_usage_stats and sys.dm_db_index_operational_stats.   Recently, I was involved in a discu…
Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

770 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