An attempt to attach an auto-named database for file C:\Users\user\Documents\YEAR 3\DOUBLE MODULE\FinalProject\App_Data\Database1.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
Dim conn As SqlConnection = New SqlConnection( _
Line 19: ConfigurationManager.ConnectionStrings("connectionstring").ConnectionString)
Line 20: conn.Open() Line 21: Dim SelectCommand As SqlCommand = New SqlCommand( _
Line 22: " insert into discussion (Creator, Discussion, Topic, Date) values (@Creator, @Discussion, @Topic, @Date)", conn)
can somebody help me, what actually the problem is?
Click on Start Menu->Navigate to MS SQL Server on the Srat menu->Locate Query analyser->A dialog box of query analyzer opens with Sql server instance name By clicking this dialog box if you get connected to query analyser it will show the list of databases
on top in a dropdown list.
alternatively, following the steps do not get opend query analyzer then, probably the installation of SQL server client tools is not done. Sorry for that. hence first need to have a sql server (any version) installed. But installation of any component need
to have a consent with Administrator.
please ask your administrator for troubleshooting to make your SQL server installation available to work with.
An attempt to attach an auto-named database for file C:\Users\user\Documents\YEAR 3\DOUBLE MODULE\FinalProject\App_Data\Database1.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
It's clear that I suspect whether you have the same db hung up in your Server——So plz remove that and then restart your app after building it and have a try with that。
Rudy91
Member
4 Points
6 Posts
I have some problem in creating a forum, but when i run it, some error occurs as below here..
Mar 13, 2012 05:48 AM|LINK
An attempt to attach an auto-named database for file C:\Users\user\Documents\YEAR 3\DOUBLE MODULE\FinalProject\App_Data\Database1.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
Dim conn As SqlConnection = New SqlConnection( _ Line 19: ConfigurationManager.ConnectionStrings("connectionstring").ConnectionString) Line 20: conn.Open() Line 21: Dim SelectCommand As SqlCommand = New SqlCommand( _ Line 22: " insert into discussion (Creator, Discussion, Topic, Date) values (@Creator, @Discussion, @Topic, @Date)", conn)can somebody help me, what actually the problem is?
aspnet2sams
Participant
1762 Points
546 Posts
Re: I have some problem in creating a forum, but when i run it, some error occurs as below here..
Mar 13, 2012 06:01 AM|LINK
Rudy91,
Is the SQL server client tools installed? if so, please try opening a connection with Query analyzer.
I mean, App_Data access could be code error but the connection to SQL is what not troubling to get access.
Let us know about your try.
Sandeep Shen...
Participant
1678 Points
492 Posts
Re: I have some problem in creating a forum, but when i run it, some error occurs as below here..
Mar 13, 2012 06:05 AM|LINK
hi
there may be a database with the same name in the backup folder of microsoft server ...check it...
Skype : sandeep.d.shenoy
Gmail : sandeepdshenoy@gmail.com
Rudy91
Member
4 Points
6 Posts
Re: I have some problem in creating a forum, but when i run it, some error occurs as below here..
Mar 13, 2012 06:43 AM|LINK
aspnet2sams
how do i check it? please provide me a step, cause I am kind of new user here...
Please provide me a step, how to check whether I have a backup folder of the microsof server or not...
aspnet2sams
Participant
1762 Points
546 Posts
Re: I have some problem in creating a forum, but when i run it, some error occurs as below here..
Mar 13, 2012 07:03 AM|LINK
Happy path:
Click on Start Menu->Navigate to MS SQL Server on the Srat menu->Locate Query analyser->A dialog box of query analyzer opens with Sql server instance name By clicking this dialog box if you get connected to query analyser it will show the list of databases on top in a dropdown list.
alternatively, following the steps do not get opend query analyzer then, probably the installation of SQL server client tools is not done. Sorry for that. hence first need to have a sql server (any version) installed. But installation of any component need to have a consent with Administrator.
please ask your administrator for troubleshooting to make your SQL server installation available to work with.
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: I have some problem in creating a forum, but when i run it, some error occurs as below here..
Mar 15, 2012 02:13 AM|LINK
It's clear that I suspect whether you have the same db hung up in your Server——So plz remove that and then restart your app after building it and have a try with that。