sql-server-express

Treating null field as zero for an update query

淺唱寂寞╮ 提交于 2019-12-23 04:47:07
问题 I'm using the SQL Express 2010 query builder. I need to be able to increment a field. In my behind code, I make a call such as tableAdapter.IncrementLikeCount(id); If I just use an increment, the like field can be null, so I want to either a. treat the null as zero in that field OR b. set to 1, if null, and increment otherwise. The most current thing I tried is option b with the following code in the query builder: UPDATE [dbo].[myTable] SET [LikeCount] = IIF(ISNULL([LikeCount]), 1, LikeCount

How do I know what version of SQL Server Express my database is in?

大憨熊 提交于 2019-12-23 03:05:44
问题 A year ago or so I started to develop an app in Visual Studio 2013. The database was in the SQL Server Express edition. I'm just getting back to it now. I've upgraded VS to 2015 Community edition and wanted to use the DB. But I can't open it. The error I am receiving is: The Data Source value in the connection string specifies an instance of SQL Server that is not installed. To resolve this issue, you can either choose to install the matching instance of SQL Server or modify the Data Source

Upload DBFile.mdf in App_Data to Azure

我是研究僧i 提交于 2019-12-22 20:42:14
问题 I have my ASP.NET MVC 3 project with a local database stored in /App_Data directory. This db is SQLExpress file (*-mdf). I have my connection string working perfectly in my development CPU, the Connection String is: data source=.\SQLEXPRESS;initial catalog=CFCBBSecurity;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\MYFILE.mdf;User instance=true" providerName="System.Data.SqlClient" When I upload it to Azure, using VS 2010, all files are in the server, but the application cannot

Reset PK auto increment column

佐手、 提交于 2019-12-22 10:34:54
问题 I've been importing thousands of records multiple times in an effort to get the import running perfectly. As a result, now when I do the live import before release, the ID columns for the auto increment column are on around 300,000. Is there any easy way to 'reset' this once I have deleted all the data from these tables? I only want to for SEO reasons, the URL: Forum/1/Post Forum/35/Post Forum/5600/Post Looks a lot nicer and more concise (therefore more clickable in results) than Forum/300124

How to fix error running storage emulator for Azure in VS 2010?

走远了吗. 提交于 2019-12-22 08:37:21
问题 I get an error when attempting to run a .NET app in Azure on the devFabric in VS2010. The error I get is: Windows Azure Tools: Failed to initialize Windows Azure storage emulator. Unable to start Development Storage. Failed to start Development Storage: the SQL Server instance ‘localhost\SQLExpress’ could not be found. Please configure the SQL Server instance for Development Storage using the ‘DSInit’ utility in the Windows Azure SDK. So I ran dsInit from the Azure SDK and I get the following

Login failed for user '' and Cannot open database “Database1.mdf” requested by the login. The login failed. Login failed for user 'rBcollo-PC\rBcollo'

*爱你&永不变心* 提交于 2019-12-22 07:58:37
问题 So..I managed to almost finish all my problems.But now i deal with another one. I used this connectionstring : SqlConnection con = new SqlConnection(@"Data Source=.\SQLEXPRESS;Database=Database1.mdf"); And it throws the next error: Login failed for user ' If i remove the .mdf extension it throws the same error Now if i'll add the following to the string: Integrated Security = true It throws this: Cannot open database "Database1.mdf" requested by the login. The login failed. Login failed for

Error when start an instance of SQLLOCQLDB 2017 on windows 7 64bit (entry point not found except)

百般思念 提交于 2019-12-22 07:07:38
问题 I tried to start an instance of SQLLOCALDB 2017 on win7 (x64) but this message box Appears : "The procedure entry point BCryptKeyDerivation could not be located in the dynamic link library bcrypt.dll" Anybody knows it's reason? more info from CMD: Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Users\hashem-7-x64>SQLLOCALDB INFO MSSQLLocalDB C:\Users\hashem-7-x64>SQLLOCALDB VERSIONS Microsoft SQL Server 2017 (14.0.1000.169) C:\Users

SQL 2005 Express Edition - Install new instance

╄→гoц情女王★ 提交于 2019-12-22 05:11:42
问题 Looking for a way to programatically, or otherwise, add a new instance of SQL 2005 Express Edition to a system that already has an instance installed. Traditionally, you run Micrsoft's installer like I am in the command line below and it does the trick. Executing the command in my installer is not the issue, it's more a matter of dragging around the 40 MBs of MS-SQL installer that I don't need if they have SQL Express already installed. This is what my installer currently executes: SQLEXPR32

SQL 2005 Express Edition - Install new instance

倖福魔咒の 提交于 2019-12-22 05:11:20
问题 Looking for a way to programatically, or otherwise, add a new instance of SQL 2005 Express Edition to a system that already has an instance installed. Traditionally, you run Micrsoft's installer like I am in the command line below and it does the trick. Executing the command in my installer is not the issue, it's more a matter of dragging around the 40 MBs of MS-SQL installer that I don't need if they have SQL Express already installed. This is what my installer currently executes: SQLEXPR32

SQL Server 2008 Express impossible to use for merge replication?

我的梦境 提交于 2019-12-21 06:05:26
问题 According to Microsoft, SQL Server 2008 Express should be able to participate in merge replication, as a pull subscriber. At least with the RMO-objects. http://msdn.microsoft.com/en-us/library/ms147890.aspx http://msdn.microsoft.com/en-us/library/ms151819.aspx But other variants should also be possible to use. However, we are not able to start the SQL Server Agent on the clients (running SQL Server 2008 Express). This seems to be a common problem, and as far as I can find, unsolved. Am I