sql-server-express

Set UK date format for SQL Express

南楼画角 提交于 2019-12-05 13:35:11
How do I permanently set the date format for SQL Express to be UK format (dd/mm/yyyy). I know I can use SET DATEFORMAT DMY , but this only works for that connection. I have also seen, exec sp_addlanguage 'British', 'English', 'January,February,March,April,May,June,July,August,September,October, November,December', 'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec', 'Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday' ,dmy,1 sp_configure 'default language', 1 reconfigure with override but, this doesn't seem to work with SQL Express (I get, Could not find stored procedure 'sp_addlanguage'.)

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-05 12:51:05
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 user 'rBcollo-PC\rBcollo'. P.S for Integrated Security = false it throws the "Login failed for user'"

Deploying a desktop application with SQL Server Express

折月煮酒 提交于 2019-12-05 12:30:18
I have developed a C# 4.0 desktop application that uses a SQL Server Express 2005 database. I have built a Setup and Deployment (msi) package that installs the application and all it's depenedencies, including the mdb database file, into a working folder under the Program Files directory. The connection string is like this: Server=.\SQLExpress;AttachDbFilename=|DataDirectory|MyDB.mdf;Database=MyDB;integrated security=true;user instance=true; The first time a database call is made, the database gets connected to the local SQL Server Express instance. The installer works as expected on XP

How to save QTime in SQL Server Express table and read it back?

大城市里の小女人 提交于 2019-12-05 11:44:13
I have a table in SQL Server Express with fields name varchar(10) and timeVar time and I want to save the value of a QTime variable in the time field. This is what I have tried: QTime time = QTime::currentTime(); QString timeString = time.toString("hh:mm:ss"); QString query = QString("insert into timeHold(name,timeVar) values ('ABC','%2')").arg(timeString); qry->prepare(query); qry->exec(); However, I get QSqlQuery::value: not positioned on a valid record . When I insert values into the table from SQL Server Management Studio, insert into timeHold values('XYZ', '12:17:35') works perfectly. To

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

拥有回忆 提交于 2019-12-05 09:00:48
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\hashem-7-x64>SQLLOCALDB START MSSQLLOCALDB Start of LocalDB instance "MSSQLLOCALDB" failed because of the

SQL server won't open DB created by Visual Studio

早过忘川 提交于 2019-12-05 08:57:44
I've built an ASP.Net site in Visual Studio, and created the DB inside it (the .mdf file is in the APP_data folder). Now, when I want to deploy in the customer site, I think about maintaining the DB without open Visual Studio, and by using the SQL Server Express tools (back up etc.). I've searched how to do this, and learned that I should attach the .mdf file to sql server. I've tried to do this and failed! The error is: Unable to open the physical file "< .mdf >". Operating system error 5: "5(failed to retrieve text for this error. Reason: 15105)". (Microsoft SQL Server, Error: 5120) Google

OLAP on SQL Express

天大地大妈咪最大 提交于 2019-12-05 08:18:28
I'm wondering if there is any desktop OLAP solution that can use SQL Express (and therefore does not require Analysis Services) I've been tasked with finding a way to allow our customers to do 'Ad-Hoc' reports, but the vast majority of them are on Sql Express, In previous jobs, customers have had Analysis Services and typically Cognos or Crystal Reports, so all that was required was to design the cube. JumpingJezza SQL Express is pretty limited, I don't know of any OLAP capabilities. Although, we use DevExpress OLAP Pivot Grid with ROLAP to get around this problem. Just create a cube-like SQL

Windows Azure VM (Iaas) unexpected restarts [closed]

女生的网名这么多〃 提交于 2019-12-05 07:04:19
Closed. This question is off-topic . It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I have a number of VMs on Windows Azure (Iaas) hosting a website. There are a number of load-balanced front-end VMs, all connecting to a single VM with SQL Express. It works well. However! I'm getting random restarts across all the VMs. As for the front-end VMs (with IIS), since they are load balanced, the site is not affected and the load balancer adjusts accordingly. But when the VM hosting the database is

Visual Studio 2012 Code First still uses SQLEXPRESS by default

心不动则不痛 提交于 2019-12-05 06:12:31
I created a brand new Web API project, created a simple Code First model (one class with an id and the dbcontext object, and that's it), and ran Enable-Migrations in the package manager console. I noticed that it creates the database in SQLEXPRESS rather than LocalDB, despite the DefaultConnection string pointing to (LocalDB) in the Web.config file. This causes subsequent queries to fail, claiming that the database hasn't been initialized. How do I get the Enable-Migrations command in VS 2012 to point to LocalDB rather than SQLExpress? I've tried installing SQL Management Studio 2012 Express

Bootstrapping SQL Express from WiX?

£可爱£侵袭症+ 提交于 2019-12-05 04:12:49
I'm working on a WPF app, and using WiX as an installer. I'd like to start using SQL Express 2012, but want to resolve installer issues first. I'm looking for a full-up example of detecting, bootstrapping, installing, upgrading and uninstalling SQL Express 2012 using WiX (although partials will be useful, too). Also, most of the detection logic I've found so far on the web uses registry keys. However, Microsoft recommends using WMI instead (see http://blogs.msdn.com/b/sqlexpress/archive/2006/07/29/faq-detecting-sql-server-2005-using-wmi.aspx ). Is that possible using WiX? This is what I have,