HEllo all,
I got a project sent to me, and I want to open it, it is delivered with a .mdf file. I downloaded VS 2008 and SQL server 2005, and i opened the project with VS2008.
But when i want to open a page that required data the page says:
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Now I really don't know what to do to make sure the .mdf info will work, how should I do this? I open Microsoft SQL 2005 server, but what should I do then??
(Sometimes people talk about 'attaching', but I don't have a clue what that means, or how to do it..)
Cheers and thanks
8 1747
Hi BD5 and welcome to TSDN
did you get a database_name.ldf file too ?
copy both the .mdf and .ldf files into the data directory of
program files / microsoft sql server / mssql / data
the path should look something like above, you will see other .mdf and .ldf files in there.
then use microsoft sql server management studio to connect to your sql server. Right click on the database folder and select attach, follow the wizard..
hope that helps
Regards Purple
did you get a database_name.ldf file too ?
Regards Purple
Thanks for the help!
I did not get a .ldf file with it... is it necessary?? By the way, that manager program you are talking about.. is it this program: http://users.pandora.be/vipers/screenn.jpg
Because I right clicked those items, but I can't find attach..
Can anyone help me please? :) I am really stucking here..
Can anyone help me please? :) I am really stucking here..
Hi BD5,
open SQL Sever, and connect to the sever...(it should connect on startup)
wight click on databases -> Attach
click add and choose the .mdf file u got.
Now on the window just below that, select the .ldf file, and remove it.
And then click OK.
Cheers
Thank you!
I could attach it!
But when I want to open a page, I still get this error:
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Source Error:
Line 97: private void LoadAndBindQuery(Query query)
Line 98: {
Line 99: EventsRepeater.DataSource = query.ExecuteReader();
Line 100: EventsRepeater.DataBind();
Line 101: }
How can I fix this?Thank you guys!
Thank you!
I could attach it!
But when I want to open a page, I still get this error:
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Source Error:
Line 97: private void LoadAndBindQuery(Query query)
Line 98: {
Line 99: EventsRepeater.DataSource = query.ExecuteReader();
Line 100: EventsRepeater.DataBind();
Line 101: }
How can I fix this?Thank you guys!
check the way your program/application is connecting to your db. there are tons of ways you can connect into db so depending on the way your application connects, you can start from there.
I currently use this connectionstring:
The database file was Project.mdf
<connectionStrings>
<add name="ProjectConnectionString" connectionString="Data Source=.;Initial Catalog=Project;Integrated Security=True;"/>
</connectionStrings>
<SubSonicService defaultProvider="SqlDataProvider" fixPluralClassNames="true">
<providers>
<add name="SqlDataProvider" type="SubSonic.SqlDataProvider, SubSonic" connectionStringName="ProjectConnectionString"/>
</providers>
</SubSonicService>
Is this wrong?
I currently use this connectionstring:
The database file was Project.mdf
<connectionStrings>
<add name="ProjectConnectionString" connectionString="Data Source=.;Initial Catalog=Project;Integrated Security=True;"/>
</connectionStrings>
<SubSonicService defaultProvider="SqlDataProvider" fixPluralClassNames="true">
<providers>
<add name="SqlDataProvider" type="SubSonic.SqlDataProvider, SubSonic" connectionStringName="ProjectConnectionString"/>
</providers>
</SubSonicService>
Is this wrong?
http://www.connectionstrings.com/
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Mike Labman |
last post by:
I am trying to connect to a remote server to open an existing project.
I go to File|Open|Project from web.
After I enter the URL and hit OK, it waits for a while and then pops
up the standard...
|
by: Cemoran |
last post by:
I am fairly new to .Net and I am having a problem opening a web project in
visual studio .Net. I created a web project from an existing project in the
manner described in an MSDN article. The...
|
by: sklett |
last post by:
I hate having to go to a new machine and open an existing web project.
So I tool my project home from work. Followed these steps:
1) saved project contents into folder under wwwroot
2) created...
|
by: Brad |
last post by:
I'm running 2003 server std, have multiple web sites and use host headers
to differentiate the web sites (I'm on a domain using DHCP so can't use
static IP's). I'm using VS2003 to create and...
|
by: Hongbo |
last post by:
Hi,
I use VS.Net 2003 with Visual SourceSafe 6.0d on a Windows 2000 Standard Server. Today, when
I tried to open an existing ASP.Net project from VS.Net, the "Set Project Location" window came...
|
by: PK9 |
last post by:
I am receiving the following error in Visual Studio 2003:
"the web server reported the following error when attempting to create or
open the web project HTTP/1.1 403 Access Forbidden"
I am...
|
by: QuenteK25 |
last post by:
Ok so I'm pretty novice at all of this VB stuff, but I have to do a personal project for a class I'm in and it's in VB. So there are a few things I want to do for it that we have never covered in...
|
by: =?Utf-8?B?d2lubGlu?= |
last post by:
Hello
Using VS 2005 VB.net when a class library gets created you can right click
the project and add a Windows Application and then set it as the "startup
project" then in the Windows...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |