I did a project with MS SQL Server CE that when installed in the 'costumer' machine just raises an unspecified excpetion.
Did some research and looks like I did everything mentioned. The dev env has sql compact 3.5 installed and sql tools for vs 2005. Using dotNet 3.5. But to make it run in de dev machine I need to add the sqlcese30, sqlceqp30, sqlceme and sqlcecompact30 dlls and its works fine.
The setup project put dotNet 2.0 as dependecy and I also added the dlls but it raises the exception and I cannot see where or what it is. Its just a single 'unspecified error' message.
please help :)
Have you tried using the SQL CE re-distributable installer on the customer machine?
You can add SQL CE 3.5 as a pre-requisite to the setup project. If it is not already in the list, copy the SQL Server Compact Edition directory from C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages to C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages and restart Visual Studio 2005.
Related
I'm developing a .Net-application that would deploy a dacpac on a client machine. For that purpose I would require SqlPackage.exe to deploy the dacpac.
I need a absolute path of SqlPackage.exe to make my application work irrespective of client's machine configuration.
Can you please help me to achieve this.
Thanks,
Yogesh
You can install sqlpackage.exe in two ways:
SSDT (SQL Server Data Tools): the location will be VS Install Directory\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\{SqlVersion}, VS install directory: C:\Program Files (x86)\Microsoft Visual Studio {VsVersion}.0
SQL Server Management Studio (SSMS) and the Dac Framework MSI: C:\Program Files (x86)\Microsoft SQL Server\{SqlVersion}\Dac\bin
SqlVersion is 140 for the SQL Server 2017, 130 for the SQL Server 2016 etc.
VsVersion is 14 for Visual Studio 2017
More details in this question.
To find sqlpackage programmatically you can make use of the TaskModuleSqlUtility powershell library. Either run the Invoke-DacpacDeployment from the powershell script (sorry not C#) or make use of Get-SqlPackageOnTargetMachine function for sqlpackage.exe path.
Search for tests in github for samples.
you also can download from microsoft doc site
https://learn.microsoft.com/en-us/sql/tools/sqlpackage-download?view=sql-server-ver15&viewFallbackFrom=sql-server-ver17
and check your version of sql and get correct instructions
I'm trying to setup Visual Studio's Server Explorer to connect to a postgresql database. I am using ASP.NET Core & EF Core with npgsql.
This feature works fine with SQL Server but there's no option to connect to postgresql and my attempts (including this guide) have failed. I'm using Visual Studio 2017 RC with MSBuild .NET Core, but I could downgrade to 2015 if necessary for this to work.
My aim is to be able to edit data from within VS and have a development 'localdb' similar to the one provided with SQL Server.
Solved this by downloading the ODBC driver, entring my credentials, then adding it to Visual Studio through 'Add Connection'. For some reason only the 32-bit version worked (on my 64-bit machine).
I was having some problems with SQL Server Express 2008 as for some reason I had several conflicting versions. I was told to go through and uninstall them, but I ended up installing all programs relating to SQL. Now, a previously functioning windows service on VS2010 no longer compiles as it is missing its SQLCE reference, and I can't re-add it as it's not in the GAC. How do I go about fixing this?
I think I'm a bit over my head with this task as I don't really have database experience. I need to take an .sql file and import it into Microsoft SQL Server Express 2008. Are there VERY beginner SQL tutorials to help me accomplish this?
If you end up having to uninstall all of it and reinstall, there is a specific order in which Visual Studio and SQL tools are best installed:
Visual Studio 2008
Visual Studio 2008 Service Pack 1
SQL Server 2008 or SQL Server 2008 R2
SQL Server 2008 Service Pack 1 or SQL Server 2008 R2 Service Pack 1
Visual Studio 2010
Visual Studio 2010 Service Pack 1
SQL Server 2012
Note that for the Express editions of SQL there is no separate Service Pack. The Service Pack is integrated with the Express edition installer.
I see from the comments that you're already trying a repair install. Make sure that you reinstall the approriate Service Pack(S) after you complete the repair.
Make sure you do some good searching before you post a question. I googled "import .sql file into sql server 2008" and came up with some good entries in the top ten.
How to import .sql file into SQL Server Express
I am trying to pragmatically run a backup of an SQL Server database using C# .NET 3.5/4.0. I have found out how to accomplish this, however I can't seem to find the namespace libraries that are used for the backup.
I am looking for the Microsoft.SqlServer.Management libraries, I just can't find these anywhere. I have installed SQL Server 2005 Enterprise and all of the tools samples and the libraries still don't seem to appear in visual studio (version 2010)
Any input is appreciated, thanks.
You will find them under:
"C:\Program Files (x86)\Microsoft SQL
Server\100\SDK\Assemblies"
(Thats on my 64-bit machine for SQL 2008.)
You need all three of the following assemblies:
Microsoft.SqlServer.Smo.dll
Microsoft.SqlServer.SqlEnum.dll
Microsoft.SqlServer.SmoEnum.dll
http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.management.smo(v=SQL.90).aspx
The Assemblies for SMO and the like exist under C:\Program Files\Microsoft SQL Server\100\SDK\Assemblies (adjust for appropriate bitness of your machine and SQL Server version - I think 2005 would be \90\ rather than \100\
I want to publish an application which has these requirements:
.NET Framework
SQL Server 2005 Express
I'm using the 'Setup Project' in Visual Studio 2008. I have added my project files and it has successfully detected the .NET Framework dependency.
The problem is:
I want to include all the files (.NET Framework and SQL Server Express setup files) with the installer.
I want the installer to first check and see if the required files are installed on the target computer.
I want to add SQL Server Express installer to the dependencies so that the installer sets up .NET Framework and SQL Server Express automatically on the target computer if needed.
Check out this one: Include another MSI file in my setup project