sql-server-2012-express

how to deploye C# windows form application developed with sql server express 2012 and crystal report

本秂侑毒 提交于 2019-12-14 04:25:18
问题 I have developed an application in Microsoft Visual Studio 2013. .Net framework 4.5. DBMS i used is sql server 2012 express and for reporting is used Crystal report 13 I want to Create a setup file which can install .net framework, sql server and crystal report on client computer. This setup should be offline and silent . I used click once but it is not working when i choose "Download file same as my application location". I meant offline setup is not working with click once. Second there is

AdventureWorks2012: For each customer, determine the number of orders created in year 2007. Show 0 for no order of that customer.

匆匆过客 提交于 2019-12-13 22:42:48
问题 AdventureWorks2012: Sql For each customer, determine the number of orders created in year 2007. If a customer has not created any order in year 2004, show 0 for that customer. Show: customer ID, # of orders created in 2007. 回答1: Same approach as in my other response - use a CTE (Common Table Expression) to determine number of sales for each customer in the year 2007: -- determine the number and total of all sales in 2007 ;WITH SalesPerCustomer AS ( SELECT c.CustomerID, NumberOfSales = ISNULL

Import Excel 2010 into SQL Server

北慕城南 提交于 2019-12-13 01:05:47
问题 I use Excel to collect & configure data, then import it into SQL Server 2012 for storage. So far I've been using the SQL Server Import & Export Wizard, but it is a pain to manually set it up constantly. Since I'm using Express, of course it won't allow me to save, or even view, the actual commands to transfer the data. I tried to set up a linked server, per How to use Excel with SQL Server linked servers and distributed queries, but get the following error: The linked server has been created

SQL Primary Key Exception

落爺英雄遲暮 提交于 2019-12-12 16:19:16
问题 I have a Mircrosoft Sql Server database made up of about 8 tables that are all related that I am trying to update. To do this I create a number of temporary tables "CREATE TABLE [vehicle_data].[dbo].[temp_MAINTENANCE_EVENT] (" + "[maintenance_event_id] int," + "[maintenance_computer_code_id] int," + "[veh_eng_maintenance_id] int," + "CONSTRAINT [PK_maintenance_event_id"] PRIMARY KEY CLUSTERED ([maintenance_event_id] ASC))"; Then after all the temporary tables have been created I drop the

SQL Server 2005 mdf file on 2012

核能气质少年 提交于 2019-12-12 04:37:22
问题 I have a SQL Server 2005 .mdf file I need to install on a server. Can I simply install SQL Server 2012 Express and attach the .mdf file without any issues, or should I stick to 2005 Express to eliminate any issues that may arise? I should also add it needs to support a ASP.NET 3.5 website. Cheers 回答1: If you have all files (mdf, ldf and potentially multiple ndf) and the database was cleanly shut down, you won't have an issue attaching to 2012. If you have only the mdf it might work but it

Automate using SQL Express to export to Excel (not CSV)

不羁的心 提交于 2019-12-12 01:05:45
问题 I need to export about 20 different query results into one Excel file in seperate tabs. I know we can use SSIS pacakage but as I am using express addition it will not let me save it. As I will be running this checks every fortnight I am looking for some automattion. Any suggessions? 回答1: Are you looking for a tool or for a method ? I know 2 tools that can do this : http://www.r-tag.com/Pages/ReportManager.aspx http://www.hybing.com/report-genie.html Report genie is free for personal use and

cross tabulation Msg 8120, Level 16, State 1, Line 8

血红的双手。 提交于 2019-12-11 21:34:40
问题 I'm trying to execute the following in sql server express 2012 SELECT t, MAX(CASE ItemID WHEN 1 THEN qun ELSE '' END) AS [Item-A], MAX(CASE ItemID WHEN 2 THEN qun ELSE '' END) AS [Item-B], MAX(CASE ItemID WHEN 3 THEN qun ELSE '' END) AS [Item-C], MAX(CASE ItemID WHEN 4 THEN qun ELSE '' END) AS [Item-D], MAX(CASE ItemID WHEN 5 THEN qun ELSE '' END) AS [item-E] FROM ( SELECT CONVERT(char(7),Production.Production.[Date] , 112)as t, sum(Production.Production.Quantity) qun, Production.Production

Install SQL Server 2012 Express Programmatically

末鹿安然 提交于 2019-12-11 10:56:15
问题 I work on Setup application to install all requirement for my WPF product, one of the requirement is SQL Server 2012 Express, the code below is to install it after I generate the configuration file for silent installation : private void SetupSQLServer() { string result = ""; string commandLine = ""; if (os64) commandLine = string.Format(@"{0}\SQLServer\sql64\setup.exe PCUSOURCE={0}\SQLServer\sql64 /SAPWD=""p@ssw0rd"" /CONFIGURATIONFILE={0}\SQLServer\ConfigurationFile64.ini /HIDECONSOLE",

Deleting a large number of records takes a VERY long time

做~自己de王妃 提交于 2019-12-10 12:32:05
问题 I have a database table (running on SQL Server 2012 Express) that contains ~ 60,000 rows. I am using the following code to purge old rows: //Deleting CPU measurements older than (oldestAllowedTime) var allCpuMeasurementsQuery = from curr in msdc.CpuMeasurements where curr.Timestamp < oldestAllowedTime select curr; foreach (var cpuMeasurement in allCpuMeasurementsQuery) { msdc.CpuMeasurements.Remove(cpuMeasurement); } When the number of deleted rows is large (~90% or more of the records in the

Silent Install of SQL Server Express 2012 from Inno Setup

牧云@^-^@ 提交于 2019-12-06 08:03:16
问题 I am trying to install SQL Server Express 2012 silently from my application installer created using Inno Setup. When running the following command from the command line, SQL Server Express 2012 is installed as I want only showing progress of the install but not allowing the user to enter any input. Command line command that works: C:\Users\Jason\Desktop>SQLEXPR_x86_ENU.exe /ACTION=Install /INSTANCENAME=MYINSTANCE /INSTANCEID=MYINSTANCE /QS /HIDECONSOLE /INDICATEPROGRESS="False"