By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,916 Members | 1,316 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,916 IT Pros & Developers. It's quick & easy.

Create local SQL db in ASP app

P: n/a
cj
Here's what I'm trying to do direct from MS (Create a Database)
http://msdn2.microsoft.com/en-us/lib...54(VS.80).aspx

Only I have VS 2005 Pro instead of Visual Web Developer. I do have SQL
Server 2005 Express.

I get: Connections to sql server files (*.mdf) require sql server
express 2005 to function properly. Please verify the installation of
the component or download from the URL:
http://go.microsoft.com/fwlink/?linkid=49251

Why doesn't it work?????
Apr 13 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Hi Cj,

From your description, you're encountering the following error when try
creating a sql express mdf database file in VS 2005, correct?

============
Connections to sql server files (*.mdf) require sql server express 2005 to
function properly. Please verify the installation of .........
=============

Based on my experience, such behavior is likely caused by the following
things:

** SQL Express is not installed or installed with non-default instance name
rather than the default "SQLExpress" (also expected by VS 2005)

** SQL Express hasn't be configured to enable User Instance

I suggest you check the above things via the following steps:

1. Check your installed SQL Express to see whether its instance name is the
"SQLExpress" or other customized value.

2. Try connecting to other database in SQL Express through VS IDE server
explorer or SQL management studio(if you have installed) to see whether it
works

3. Try using script to check the user instance configuration in SQLExpress,
if not enabled, enable it. Here is the BOL reference about "user instance":

#Working with User Instances
http://msdn2.microsoft.com/en-US/library/ms254504.aspx

In addition, here are two web threads about the similar problem and include
some clues on checking the SQL Express instance name and the expected
instance configuration in VS 2005:

http://predicatet.blogspot.com/2007/...er-files-mdf.h
tml

http://forums.microsoft.com/MSDN/Sho...24596&SiteID=1

Hope this helps.
Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Apr 16 '07 #2

P: n/a
cj
Hi Steven,

I don't remember the setup program asking me for an instance name. It
shows as cj\sqlexpress in MS SQL Server Management Studio Express.

http://msdn2.microsoft.com/en-US/library/ms254504.aspx was too confusing
for me to understand but thankfully I had also posted in the SQL Server
group too and a Charles Wang gave me instructions to check user
instances. Sill he left out a few small things like -S after sqlcmd but
I got it to work finally. I believe user instances are enabled. I ran
"sqlcmd -S cj\sqlexpress" from the dos prompt then
1sp_configure
2go
config_value & run_value both show 1 for user instances enabled

Your second link http://predicatet.blogspot..... was very simple but he
said his had "SQLSERVEREXPRESS" in the SQL server instance name and he
had to leave it blank. Mine was blank but I decided to put "SQLEXPRESS"
in it. It Worked!!!!

I don't know what Visual Studio was thinking the default name was when
it was left blank but I guess it really doesn't matter.

Thank you very much for you help.

CJ

Steven Cheng[MSFT] wrote:
Hi Cj,

From your description, you're encountering the following error when try
creating a sql express mdf database file in VS 2005, correct?

============
Connections to sql server files (*.mdf) require sql server express 2005 to
function properly. Please verify the installation of .........
=============

Based on my experience, such behavior is likely caused by the following
things:

** SQL Express is not installed or installed with non-default instance name
rather than the default "SQLExpress" (also expected by VS 2005)

** SQL Express hasn't be configured to enable User Instance

I suggest you check the above things via the following steps:

1. Check your installed SQL Express to see whether its instance name is the
"SQLExpress" or other customized value.

2. Try connecting to other database in SQL Express through VS IDE server
explorer or SQL management studio(if you have installed) to see whether it
works

3. Try using script to check the user instance configuration in SQLExpress,
if not enabled, enable it. Here is the BOL reference about "user instance":

#Working with User Instances
http://msdn2.microsoft.com/en-US/library/ms254504.aspx

In addition, here are two web threads about the similar problem and include
some clues on checking the SQL Express instance name and the expected
instance configuration in VS 2005:

http://predicatet.blogspot.com/2007/...er-files-mdf.h
tml

http://forums.microsoft.com/MSDN/Sho...24596&SiteID=1

Hope this helps.
Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.


Apr 16 '07 #3

P: n/a
Thanks for your reply Cj,

Glad that you've got it working. So is the SQL express on your machine be
installed separate from Visual Studio(not install together)? Anyway, as one
of the thread has mentioned, when you want to ensure the installed SQL
Express instance matches the Visual studio's expected SQL Express
instancce, you can use the following setting in Visual Studio 2005:

Tools---options ----Database tools---Data connection

Have a good day!

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Apr 17 '07 #4

P: n/a
cj
Yes, SQL Express was installed separately from Visual Studio.
Steven Cheng[MSFT] wrote:
Thanks for your reply Cj,

Glad that you've got it working. So is the SQL express on your machine be
installed separate from Visual Studio(not install together)? Anyway, as one
of the thread has mentioned, when you want to ensure the installed SQL
Express instance matches the Visual studio's expected SQL Express
instancce, you can use the following setting in Visual Studio 2005:

Tools---options ----Database tools---Data connection

Have a good day!

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
Apr 17 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.