Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 13th, 2008, 08:32 PM
Registered User
 
Join Date: Jan 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to khempire
Default Ex0201 - Create Database

Morning,

How can I solve this problem?
When I try to add SQL Database to my project in C# 2005, it alerts me the message "Connections to SQL Server files (*.mdf) require SQL Server Express 2005 to function properly. Please verify the installation of the computer or download from the URL:http://go.microsoft.com/fwlink/LinkID=49251". Obviously, I installed Microsoft SQL Server 2005 in my computer already.

Regards,
Visoth

Just another step straight into coding.
 
Old January 13th, 2008, 09:57 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

It's funny how this happens. Just a few days ago I got this same error and spent quite a while trying to figure out what the problem was. It turned out that my installed instance of SQLServer Express was under a name that didn't match what Visual Studio was expecting.

Visual Studio expects a SQL instance called "SqlExpress" by default. This is also the default instance name of Sql express.

In Visual Studio go to Tools -> Options... -> Database Tools -> Data Connections -> SQL Server Instance Name. There you can see what it is set to and change it if necessary.

To check your running instances, in Windows go to Start -> Programs -> Microsoft SQL Server 2005 -> Configuration Tools -> SQL Server Configuration Manager. Then look under the SQL Server 2005 Services node to see all the server services that you have set up. In each service's name will be an instance name. Unfortunately, if one of these is actually the machine's "default instance" it is not obvious, they all have names.

Verify that you have at least 1 instance running and that it's name matches that in Visual Studio.

After re-reading your post to make sure I answered everything, I noticed you say "I installed Microsoft SQL Server 2005". Did you install the regular/full version of the express version? The full version does not allow dynamic connections to mdf files.

-Peter
 
Old January 14th, 2008, 08:26 PM
Registered User
 
Join Date: Jan 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to khempire
Default

Hey bro..! the problem still happens. So, how to do? Do something wrong with computer or what?

Just another step straight into coding.





Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i create a new ado database ? jerryham VB.NET 8 October 13th, 2008 09:21 PM
Unable to create database. rupen SQL Server 2005 4 December 6th, 2007 02:39 AM
How to create a Database koushikroy2001 SQL Language 2 January 4th, 2006 04:03 AM
Create database Yee MySQL 2 November 5th, 2004 06:14 AM
How to create a new database? gpc Classic ASP Databases 17 December 19th, 2003 10:24 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.