How to add SQL compact database file to VS 2013 solution - sql

I have a project that uses SQL Compact DB 3.5. I used to work with VS 2010, and everything was going well, I then installed VS 2012, and opened the project with Visual Studio 2012, it asked me to update the database to 4.0, and I did and it worked. Now I have VS 2013, I installed the SQL Server Compact toolbox, and I managed to connect to the database file during design time, but during runtime, I don't know how to do so,
before I was using this connection string: "Data Source=my_db.sdf;Password=password"
I deleted the converted 4.0 database file, I only have the 3.5 file, and no more VS 2012,
if I add the database file to the solution, it tells me I am using an old version and I need to update it.
The question is: What connection string do I use to connect to the database during runtime which I am successfully viewing in SQL Server Compact Toolbox

I deleted the Reference to SqlCe 4.0 and added a reference to SqlCe 3.5 and it worked, thanks anyways, I hope this answer helps anyone

Related

VS 2013 Could not load file or assembly 'Microsoft.SqlServer.Management.SqlParser, Version=13.0.0.0

I have some SQL CLR projects I created with VS 2012. I want to open them with VS 2013, so I installed SSDT 16.5 for VS 2013.
Now, I am getting this error opening the SQL CLR projects:
Could not load file or assembly 'Microsoft.SqlServer.Management.SqlParser, Version=13.0.0.0
Thanks for any ideas
I also faced this issue, Installing SQL Server 2017 broke SSDT. I have fixed the issue, Here is how I was able to fix it
Steps
Uninstall Microsoft SQL Server 2017 TSQL Language Service.
Install TSqlLanguageService.msi from SQL Server 2016. Part of Microsoft® SQL
Server® 2016 Feature Pack - https://www.microsoft.com/en-us/download/details.aspx?id=52676 (Version:13.0.1601.5 File: ENU\x64\TSqlLanguageService.msi)
then restart visual studio and reload the project
Installing a newer version of SQL Server Management Studio can break SQL Server Data Tools. You need to downgrade the TSQL Language service to 2016 (13.0.0.0) level.
Originally from here:
https://www.sqlservercentral.com/Forums/1921984/Microsoft-Visual-Studio-Could-not-load-file-or-assembly-MicrosoftSqlServerManagementSqlParser-Versio
Installing SQL Server 2017 broke SSDT. I have fixed the issue, but
just wanted to post this because I couldn't find the solution at
first. Steps
Uninstall Microsoft SQL Server 2017 TSQL Language Service.
Install TSqlLanguageService.msi from SQL Server 2016.
Part of Microsoft® SQL Server® 2016 Feature Pack - https://www.microsoft.com/en-us/download/details.aspx?id=52676
Version:13.0.1601.5
File: ENU\x64\TSqlLanguageService.msi
I hope this helps someone.
https://connect.microsoft.com/SQLServer/feedback/details/3106613/net-exception-could-not-load-file-or-assembly-microsoft-sqlserver-sqlclrprovider-13-100-0-0-after-installing-sql-server-2016
Client applications should not be using the assemblies from the Program Files folders unless they are from the specific SDK folders (such as "C:\Program Files (x86)\Microsoft SQL Server\130\SDK")
The 13.100.* version of assemblies you are seeing are currently only for use by Microsoft tools and so are not placed with all needed dependencies being in the same place. The DTS folder especially has only a subset of SMO assemblies since that code does not need things such as SqlClrProvider.
Please use either the assemblies from the SDK folders or from SharedManagementObjects.msi to use as references for your applications.

Cannot find a dll for SQL Server from VS 2012

Microsoft Visual Studio
Could not load file or assembly
'Microsoft.SqlServer.Management.Sdk.Sfc, Version=11.0.0.0,
Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its
dependencies. The system cannot find the file specified.
I cannot "see" the referenced DLL even though it is in the proper spot. I can therefore not bind the datasource to the control. What might I be failing to do?
Please see original question and answer here: Could not load file or assembly Microsoft.SqlServer.management.sdk.sfc version 11.0.0.0
Problem: This issue happens when assembly Microsoft.SqlServer.management.sdk.sfc version 11.0.0.0 not found by visual studio 2012.(Sql server 2012)
Solution: just go to http://www.microsoft.com/en-us/download/details.aspx?id=35580 and download:
ENU\x64\SharedManagementObjects.msi for X64 OS or
ENU\x86\SharedManagementObjects.msi for X86 OS,
then install it, and restart visual studio.
Problem: This issue happens when assembly Microsoft.SqlServer.management.sdk.sfc version 10.0.0.0 not found by visual studio 2010.(Sql server 2008)
Solution: just go to http://www.microsoft.com/en-us/download/details.aspx?id=26728 and download:
1033\x64\SharedManagementObjects.msi for X64 OS or
1033\x86\SharedManagementObjects.msi for X86 OS,
(In most cases downloading this is better http://go.microsoft.com/fwlink/?LinkId=123708&clcid=0x409)
then install it, and restart visual studio.
From here:-
From the error message, we can see there is some missing component in
VS 2012 installation. The assembly in question -
Microsoft.SqlServer.Manangement.Sdk.Sfc version 11 - is a component
DLL for SMO assemblies (even though SFC was originally created for
more ambitious SSMS extension), and it is included in SQL Server 2012
Shared Management Objects.
[SQL 2012 Shared Management Objects] has dependency on [SQL System
CLR types] component, so you have to install SQL Server System CLR
Types first.
[SQL Server 2012 System CLR Types] can be found in the middle of SQL
2012 Feature Pack web page (
http://www.microsoft.com/en-us/download/details.aspx?id=29065 )
Just want to share my experience on this.
I, too, encountered this error. I'm using MS Visual Studio 2013 and I have an MS SQL Server 2008, though I have had MS SQL Server 2012 Installed before.
I was banging my head on this error for a day. I tried installing SharedManagementObject, SQLSysClrTypes and Native Client, but it didn't work. Why? Well I finally figured that I was installing 2008 or 2012 version of the said files, while I'm using Visual Studio 2013!! My idea is since it is a database issue, the version of the files should be the same with the MS SQL Server installed on the laptop, but apparently, I should have installed the 2013 version because the error is from the Visual Studio and not from the SQL Server.
I had this problem after installing SQL Server Express 2014. Apparently 2012 points to some files that are in 2014 and I completely erased all old versions of SQL Server. After much frustration I ended up reloading Visual Studio 2013 and it set up all of the files it needed and now works with SQL Server Express 2014

Cannot manage .sdf file in VS 2010 Ultimate SP1

I keep getting this error whenever I try to open a local DB .sdf file in VS 2010 SP1 Ultimate
Data provider required to connect to local data file could not be found.The file will be added to project but the typed dataset associated with the file will not be generated.
I have the VS 2010 SP1 Tools for SQL Server Compact 4.0 already installed.
Basically I had VS 2010 Express installed and that worked just fine, I have since uninstalled it and installed VS 2010 SP1 Ultimate.
How can I fix this annoying error?
You must install the SQL Server Compact 4.0 Tools for VS 2010 SP1 as well, I have a direct link here: http://erikej.blogspot.dk/2011/01/sql-server-compact-40-released.html

Entity Framework Installation Fails & Crashes Visual Studio

I'm trying to install Entity Framework 5.0 into a Visual Studio 2012 Pro project. Part way through the install it fails and crashes Visual Studio. I suspect that it is trying to figure out which SQL server edition to use when it fails. I have SQL 2008 R2, SQL 2012 and SQL 2012 Localdb installed. No connection string gets added to the config file before it crashes. I've been searching the forums and trying many things but no luck yet. Any help would be appreciated. Same failure when using Visual Studio 2010 Pro.
I found that the EF installer can't handle multiple versions of SQL installed side by side. After removing all but one the program runs fine.

Where can I get a VS 2005 Report Server project template?

Problem:
-- I have a VS 2005 Report Server project with many reports.
-- I moved it to a new computer with SQL Server 2008 and VS 2005 and 2010 installed.
-- I was able to port the 2005 Report Server over OK (it's still 2005 even though the server is 2008), but now I can't open up my old project in VS 2005.
As I understand it, it's because SQL Server 2005 is not installed, which would have installed the Report Server Project template in VS 2005. SQL Server 2008 uses a different type of report project template.
So my question is: is it possible to get this template from somewhere else, other than from SQL Server 2005? For example, the Visual Studio 2005 on my old computer has this template installed. Is it possible to export it in some way? Or can I download it from the web somewhere?
I really need to be able to open this project!
I don't believe so, you'd need to install the Visual Studio 2005 Business Intelligence Designer Studio (BIDS) that came on the SQL Server 2005 install.
If you're a masochist and you sound desperate enough, you can download Report Builder 1.0 and use it to edit your reports. If you've watched the Harry Potter flicks, the 1.0 version of that app is a Dementor and prepare to have the joy sucked out of your life if you have to use the tool for very long. You can browse to your reporting server instance http://myserver/Reports/ (assuming default install) and there will be a Report Builder link there which runs a clickOnce non-install. MS does not supply a local install of the tool as they have with 2.0 and 3.0