I develope a C# application that works with SMO Classes and uses these assemblies :
Microsoft.SqlServer.ConnectionInfo.dll
Microsoft.SqlServer.Management.Sdk.Sfc.dll
Microsoft.SqlServer.Smo.dll
Microsoft.SqlSever.SqlEnum
and I use SQL Server 2012 assemblies, therefore my App will work with sql server 2012 and I must install sql server 2012 and shared mangement object 2012 on target machine in order to my app work correctly.
now I want to Know if sql2005/2008 is installed on target machine then my App can work with that sql engine or Necessarily I must install sqlserver 2012 ?
Related
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
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
I have created a Windows Forms C# application. But I am facing problems in creating a setup for my application.
My problem is
I want to install the prerequisites as a chain of installers with a common progress bar.
.NET Framework 3.5
SQL Server Express Edition SP2 (optional, that is, install only if SQL Server is not installed)
Crystal Reports redistributable package.
All these prerequisites must be embedded in the setup file. I have created a bootstrapper to install the SQL Server Express Edition if it not already installed.
After installation, it should update the exe.config file with the connection string datasource with the SQL Server Express Edition instance.
You can get WiX 3 to bootstrap prerequisites quite easily. Here is an explanation showing how to do it for .NET 3.5 and Windows Installer.
You should be able to use the same principle for SQL Server Express Edition and Crystal Reports.
I am trying to deploy an application that uses SMO on a workstation without SQL Server installed on it. The instance the app is connecting to is SQL Server 2008. The application is failing with:
Could not load file or assembly 'Microsoft.SqlServer.Replication, Version 10.0.0.0, Culture=neutral, PublicKeyToken=89845cdc8080cc91' or one of its dependencies. An attempt was made to load a program with an incorrect format.
The assembly in question is in the same path as my application as well as system32. I am running this on a Windows 7 64 bit box. I have run SQL Native Client, CLR, and SMO MSIs from the 2008 SMO redist download page.
This app worked fine when connecting to SQL Server 2005.
What gives?
It looks to me like you are referencing SMO Version 10 in you project, but the client machine you are trying to deploy your application to is probably running SMO version 9. I had this same problem and updated my project references to reference SMO verison 9. I also set the SMO objects to copy local = true to ensure the correct assembly was referenced on the client machine.
I have created an Windows application.
I used
FRONT END : C# (VISUAL STUDIO 2008)
BACK END : MICROSOFT SQL SERVER 2008
.NET FRAMEWORK : 3.5
Now after deployment when I am installing the application in my Clients machine is it necessary to first install .Net Framework, VisualStudio2008 and Sql Server 2008 before installing Application?
And in which module of building my set up file(FileSystem Editor, Registry editor etc..) should I attach the DataBase?
This is my first application of deployment so please help me out with tips and tracks for deployment?
Thanks in advance!!
You customer will not use Visual Studio, so you don't need to install it.
You will need to install SQL Server manually. You cannot have your setup project install it automatically. Just install SQL Server 2008 (SP1 or higher). I believe this will install all or most of .NET 3.5 for you. If not, then when your setup is run, it will install any other parts of .NET that are needed.
BTW, be sure to test the installation steps on a clean system of your own (maybe on Virtual PC) before trying it on your customer's site!
It depends if you want every client to have SqlServer installed locally (usually, on an Enterprise scenario, you have already a server box with Sql Server running, and you just need to deploy your database there).
If having Sql Server running locally is a requirement, you might want to take a look at this thread which will help you: How to install a custom desktop application database to SQL Express?
You should install SQL Server manually before installing your application.
You just need to install you application, you do not need visual studio. If you use a setup project to do this it should detect that it requires the .Net framework and give the user the option of installing it.
You don't have to install the Visual Studio. For running .Net applications, you only require .Net Framework. And for SQL 2008 also .Net required. And for Database, either you have to run SQL Script or you may need to restore the database. Running SQL Script is better I think, you can do it via a Batch file.