Opening a Visual Studio 2010 Project in Visual Studio 2008 - c#

I have an application on c# and sql client, visual studio 2010, I want to open the project on visual stdio 2008, I open new solution and add the project to him. but on run time I accept this error:
cannot be opened because it is version 655. This server supports version 612 and earlier. A downgrade path is not supported.

The MDF database in your project is version 655, which indicates it was created on SQL Server 2008. The server you connect to only accepts version 612, which indicates is a SQL Server 2005. A database created on SQL Server 2008 cannot be downgraded to SQL Server 2005. You must make sure you develop your database for the correct target server version. Now you have to either upgrade your deployment site to SQL Server 2008, or copy all the content of your SQL Server 2008 database into a new SQL Server 2005 database.

Related

Database connection error in Visual Studio 2013

I am using Visual Studio 2013 and have installed MS SQL Server 2014. I am trying to generate my database from a model (edmx) but I get the following error (screenshot attached):
In the edmx.sql file, is written:
-- Entity Designer DDL Script for SQL Server 2005, 2008, 2012 and Azure
I can see that 2014 version is missing from this generated file, and seems that the program tries to connect to the 2012 version .. how can I avoid this and manage visual studio tu use the 2014 version of MS SQL Server?
Thanks in advance
What Sql Server data tools are you using?
Have you tried newer version of it:
Microsoft® SQL Server Data Tools for SQL Server® 2014 CTP2

Export SQL Server to SQL Server Compact 4.0 with VS Express

I have created a C# application that connects to a Microsoft SQL Server Express Edition (64-bit) database. However, I want to transition the project from SQL Server to a local database and convert the .mdf file to a .sdf file.
The best solution I have found is SQL Server Compact Toolbox written by ErikEJ also pointed out by this post. When attempting to install the add-in to Visual Studio I receive an error:
This extension is not installable on any currently installed products.
even though the installer recognizes that Microsoft Visual Studio Express 2012 for Windows Desktop is installed. I believe this is only targeted for Professional and above.
I have also attempted to use the standalone tool. However, the option I want is grayed out and it's for version 3.5 instead of the current version 4.0.
I have also looked at trying to export/convert from Microsoft SQL Server Management Studio 11.0.3128.0. However, I have had no luck.
Is there a solution for VS Express Edition, or am I out of luck?
Just use the standalone edition for SQL Server Compact 4.0, available here: https://sqlcetoolbox.codeplex.com/releases/view/104096

Is it possible to run an application built on sql server 2008 to run with 2005

I have a .NET 4.0, SQL Server 2008 application built on VS 2010.
Since more than 10 months I have been working on a project and its completed now. I moved to the next task of creating an installation of the software. Its also done. But now I have a big issue.
My clients already run software running SQL Server 2005 and its installed on their system. However when I was packaging my VS2010 C# application, I deployed it with prerequisite of SQL Server 2008 but now the problem is, when I try to install my application, it asks to uninstall the 2005 and then to install 2008. But my clients are very rigid to allow my program to uninstall any application on their system. I am stuck here.
I also tried to remove it from my prerequisites and the application was successful to install itself but after when I tried to run my application, its unable to access the database.
How I can solve this issue? Is there any way to make application and database both work with SQL Server 2005 or 2008. Or maybe any other expert advice.
EDIT 1
I also have Datetime stuff which really annoyed with to accomplish, as my project is multilingual so I have separate functions to handle datetime to insert in SQL.
EDIT 2
Is it possible to upgrade SQL Server 2005 to 2008 using my own Visual Studio Deployment Project?
EDIT 3
This is the error I am getting
Prerequisite check for system component SQL Server 2008 Express failed with the following error message:
SQL Server 2008 Express Service Pack 1 (x64) cannot upgrade the existing instance of SQL Server 2005 Express (x64 WoW) named 'SQLEXPRESS'. Uninstall this instance of SQL Server 2005 Express and retry installing SQL Server 2008 Express Service Pack 1 (x64)."
See the setup log file located at 'C:\Users\BOOGI~1\AppData\Local\Temp\VSD41A1.tmp\install.log' for more information.
EDIT 4 (Main)
Is it possible to make a Microsoft SQL Server database file compatible to run with both SQL Server 2005 and SQL Server 2008?
It is usually not a problem to run an application against any version of SQL Server. Create the database using Management Studio and you're ready to go.
If you have a setup, you may need to change the prerequisites, so that it works with SQL Server 2005.
You may have to adjust the connection string. In the error message you're providing, it is obvious that the instance name of the SQL Server is "SQLEXPRESS", so you need to add this in your connection string.
Also, it is not a problem to run SQL 2005 Express and 2008 Express side by side.
One thing you can do is install SQL 2005 in your development machine or another machine then migrate your schema's and data from SQL Server 2008 to SQL Server 2005 and get your C# application working again. .NET 4.0 doesn't care which version of SQL server you are connecting to as long as you have the appropriate drivers installed for each appropriate database.
For your datetime create a function in SQL server so that it works in both version. Check out some examples in this link.
Thanks,
Kalagen

Visual Studio 2008 doesn't connect to SQL Server 2008

When i try to establish a connection with SQL Server 2008 i am getting:
The server version is not supported. only servers up to SQL Server 2005 are supported.
What's wrong with this? is there a patch?
Visual Studio 2008 came out in 2007, while SQL Server 2008 wasn't released until Late 2008. So although they have the same year in the names, there is a pretty big gap between them.
The current solution is to upgrade to Visual Studio 2008 Service Pack 1
SP1: http://www.microsoft.com/downloads/en/details.aspx?FamilyId=FBEE1648-7106-44A7-9649-6D9F6D58056E&displaylang=en

C# sql express 2008 not showing in the list of pre-requisites in setup project

I'm creating an installer via VS setup project, and I'd like to make sure sql express 2008 is installed if it is not already installed.
I right clicked on my installer project and go to Pre-requisites but SQL Server 2008 Express is not there. 2005 is listed, but I need 2008.
I installed SQL Server 2008 Express after Visual Studio. What do I need to do to re-register with Visual Studio so it allows me to select SQL Server 2008 Express?

Categories

Resources