sql-server-express

How can I create a local user profile for the anonymous user of an ASP.Net MVC application under IIS 7?

点点圈 提交于 2019-12-01 20:17:23
I've been experimenting with ASP.Net MVC, and have come across a problem that is probably not specifically MVC related. But I cannot get the authentication in the default MVC application (the one created by the wizard when you create a new MVC project) to work properly under IIS 7 on Windows 7. If I run under the Visual Studio environment, it works, but if I switch the settings to run under IIS instead, I get the following exception trying to submit the login or registration: Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path.

Entity Framework 4.1 is not adding any rows to SQL Server Express database

◇◆丶佛笑我妖孽 提交于 2019-12-01 18:03:20
问题 Working with Entity Framework 4.1 with a SQL Server Express .mdf database . For test purpose I am trying to perform CRUD operations on SQL Server Express database using Entity Model in a WPF application . I am new to this concept, and I followed the video tutorial and done coding according that I created Entity model of single very simple table. And I wrote simple code in cs file to perform adding one row to the database using following code testEntities db = new testEntities(); TestTable tb

Entity Framework 4.1 is not adding any rows to SQL Server Express database

旧街凉风 提交于 2019-12-01 17:44:35
Working with Entity Framework 4.1 with a SQL Server Express .mdf database . For test purpose I am trying to perform CRUD operations on SQL Server Express database using Entity Model in a WPF application . I am new to this concept, and I followed the video tutorial and done coding according that I created Entity model of single very simple table. And I wrote simple code in cs file to perform adding one row to the database using following code testEntities db = new testEntities(); TestTable tb = new TestTable(); tb.Name = txtName.Text; tb.Email = txtMail.Text; db.TestTables.AddObject(tb); db

Proper way to make a connection and query to a SQL Server Express database

≯℡__Kan透↙ 提交于 2019-12-01 17:20:15
I need a sample C# (console application) code witch connects to an SQL Server Express database and inserts a few variables into a table "laptops" SQL Server Express is @ localhost user name is database and password is testdatabase What is the proper way to do that ? Basic ADO.NET 101: set up a connection set up a command to do something execute that command Step 1: setting up a connection You need to know the connection string to your database. Check out http://www.connectionstrings.com for a ton of examples. In your case, you say it's a local SQL Server Express instance - but unfortunately,

How to set (combine) two primary keys in a table

混江龙づ霸主 提交于 2019-12-01 17:02:06
For a small sales related application, we designed database using logical data model. Come to the stage to convert in to physical model. While creating table in SQL Server Management Studio Express, according to our logical data model, we need to combine two attributes to form unique id. Is it possible to combine two primary keys and set it? But while observing Northwind Sample, we found that in the ORDER DETAILS table, we can see two primary keys Order Id & Product Id . And according to rule table can't have two primary keys. So how it happened in Northwind? In my case how should I set two

How to set (combine) two primary keys in a table

早过忘川 提交于 2019-12-01 15:03:34
问题 For a small sales related application, we designed database using logical data model. Come to the stage to convert in to physical model. While creating table in SQL Server Management Studio Express, according to our logical data model, we need to combine two attributes to form unique id. Is it possible to combine two primary keys and set it? But while observing Northwind Sample, we found that in the ORDER DETAILS table, we can see two primary keys Order Id & Product Id . And according to rule

Quick deployment of Visual Studio 2010 app with SQL database

青春壹個敷衍的年華 提交于 2019-12-01 12:22:07
问题 I am new to Visual Studio 2010, so please bear with me. Back in the days of using VB6 combined with an Access database, all I had to do was to use the Package & Deployment wizard and include the database file in the setup. Then all the client had to do was run one setup file and the application would magically run right away (the database would be placed in the App Path). Is there some way to create a setup file in VS 2010 which will also install SQL Server Express automatically, attach the

Create installer for winForms with local DB

╄→гoц情女王★ 提交于 2019-12-01 04:56:37
问题 I have a Winforms application (checkers game) which have a local DB (using SQL Server Express) to save the registered players and their scores.. I'm trying to create an installer for this app by this tutorial Everything is fine, but when I'm trying to add the players I'm getting a SQL error that says the database wasn't found.. so how can I add the local DB ( .mdf file) to the installer? 回答1: Provided that the conditions to use local DB at the client machine are OK (see LocalDB deployment on

Are Microsoft SQL Server “Express” editions free to develop on?

江枫思渺然 提交于 2019-12-01 04:27:05
Am I able to develop a software for free on Microsoft SQL Server 2005/2008 Express edition databases? Yes, You can. But Express version have few limitations SQL Server use only one CPU at a time Maximum memory is 1GB Database size limit is 4GB And you can redistribute SQL Server, but you must register for that at Microsoft. UPDATE - SQL Server 2008 R2 Database size limit is 10GB Yes, here is a relevant faq . You are free to redistribute your applications commercially... Yes, SQL Server Express is free to develop on, free to use, free to ship to your customers - FREE all around! :-) In addition

SqlDataReader to read into List<string>

天涯浪子 提交于 2019-12-01 03:54:16
I am writing a method in C# to query a SQL Server Express database from a WCF service. I have to use ADO.NET to do this (then rewrite it with LINQ later on). The method takes two strings ( fname, lname ) then returns a "Health Insurance NO" attribute from the matching record. I want to read this into a list (there are some other attribs to retrieve as well). The current code returns an empty list. Where am I going wrong? public List<string> GetPatientInfo(string fname, string lname) { string connString = "Data Source=.\\SQLEXPRESS;AttachDbFilename=C:\\Users\\xxxx\\Documents\\Visual Studio 2010