Control Panel
Forum
Hosting Help
ASP.NET 3.5 & SQL 2008 Web Hosting
Resources
Login
Members
Shared Hosting
|
New Features
|
Advertise
|
Tutorials
|
Silverlight Tutorials
|
Product Reviews in India
|
Free aptitude test questions
|
TATA Nano Car reviews
Total
members
:
88776
Average new registrations per day (in last 7 days):
89
New Registration:
Open
Register Now
Home
»
Questions & Answers
»
Cannot open database "mallett76_Paul_Test_Database.mdf" error
Cannot open database "mallett76_Paul_Test_Database.mdf" error
9/9/2008
Author:
Paul N Mallett
http://aspspider.org/mallett76
Paul's Website
Hello,
I'm fairly new to asp spider.net. I tried to create a connection to a sql server database, but received the following error: Cannot open database "mallett76_Paul_Test_Database.mdf" error
Below is my code, any assistance would be appreciated. Thanks, Paul
<%@ Page Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
<script" target=_blank>http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script
runat="server">
</script>
<html xmlns="
http://www.w3.org/1999/xhtml
" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" runat="server" Text="test" Width="106px"></asp:Label>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Data Source=.\SQLExpress;Persist Security Info=True;Integrated Security=SSPI;Initial Catalog=mallett76_Paul_Test_Database.mdf"
SelectCommand="SELECT [test] FROM [test_table]"></asp:SqlDataSource>
</div>
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
AutoGenerateColumns="False" DataSourceID="SqlDataSource1">
<Columns>
<asp:CommandField ShowSelectButton="True" />
<asp:BoundField DataField="test" HeaderText="test" SortExpression="test" />
</Columns>
</asp:GridView>
</form>
</body>
</html>
Answers .............
Author:
Paul N Mallett
Posted Date: 10/3/2008
http://aspspider.org/mallett76
Paul's Website
Hello,
I figured out how to do it a while ago.
I'll post it, in case someone else runs into the issue.
1. Create the database, only the database, no tables, via microsoft visual studio 2005 or 2008. Don't do it, via sql express, won't work, due to security issues.
2. Upload the file to aspspider.com
3. Then, attached the file. Should see some message, Database attached successfully, and some other messages.
4. Then, you'll need to hard code creating tables, as unfortunately sql analyzer isn't available on this site.
Author:
Johny Ricardo
Individual
Posted Date: 10/3/2008
http://aspspider.info/llzheroll
SISTEMA DE PREVENTAS MOVISTAR
TENGO ESTE PROBLEMA TAMBIEN ME PUEDEN AYUDAR
Cannot open database "llzheroll_Corporacion" requested by the login. The login failed.
Login failed for user 'DOTNETSPIDER1\llzheroll'
Author:
Paul N Mallett
Posted Date: 10/4/2008
http://aspspider.org/mallett76
Paul's Website
Hi Johny,
Do you have microsoft visual studio 2005 or microsoft visual 2008, for starters? If you do, did you try creating the database in microsoft visual studio? I was able to establish a connection with the database only through microsoft visual studio web developer. If you try microsoft sql server express, it doesn't seem to work.
You must
login
to post answer for this question.
Partners
Privacy Policy
Terms of use
Contact Us
SpiderWorks Technologies.
All Rights Reserved.