0

I am using SQL Server 2008 Express

I created a database using the following queries

create database testdata
  on primary (name = testdata, filename='C:\data\testdata.mdf'),
  filegroup filestreamgroup contains filestream (name = testdata_1, filename = 'C:\data\testdata_1')
  log on (name = log, filename = 'c:\datatestdat.ldf')
go

I also created some tables with columns and everything worked well. Then I wanted to connect it to asp.net (visual studio 10) using data connections that is when I started having problems I followed the steps given in http://blogs.msdn.com/b/bethmassi/archive/2011/10/27/how-to-connect-to-and-diagram-your-sql-express-database-in-visual-studio-lightswitch.aspx but it didn't work for me. On the process close the SQL Server Management Studio but I saved my work (the data that I have created) when I couldn't connect the database to asp.net using data connections I came back to SQL Server Management Studio I opened it clicked on new query and type use testdata which is my database name what I got is this error

Msg 945, Level 14, State 2, Line 1
Database 'MYdb' cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details.

pls any help will be appreciated for it took me 2days creating and inserting all the data in this database

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • Post your SQL Server errorlog, so we can help you. – Atropo Sep 25 '13 at 14:38
  • You created a database called **`testdata`**, and now you're trying to connect to **`MYdb`** ?!?!?! Also: if you created your database in SQL Server Management Studio, **DO NOT** attach it as a **SQL Server database file** in Visual Studio! Connect to the server, and use the database's **logical database name** (`testdata`) that you've defined. – marc_s Sep 25 '13 at 14:45
  • Database 'testdata' cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details. this is the error message thanks for your concerns – walter chuks Sep 25 '13 at 15:04
  • "Msg 945, Level 14, State 2, Line 1 Database 'testdata' cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details." – walter chuks Sep 25 '13 at 16:49

0 Answers0