Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
spmchugh82
Starting Member
13 Posts |
Posted - 2009-02-19 : 17:21:13
|
| I am writing an ASP.NET application and I need a SQL Server .mdf file to act as my database. The table is already created... it is very simple. But I can't figure how how to do anything except save the solution. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
spmchugh82
Starting Member
13 Posts |
Posted - 2009-02-19 : 17:27:54
|
| I know the table was created because I can save the solution and/or close SQL Server and open it back up and the table will be there. But I can't find the database file on my computer. |
 |
|
|
spmchugh82
Starting Member
13 Posts |
Posted - 2009-02-19 : 17:45:56
|
| Can anyone answer this? Cause this seems like a real easy one for anyone that knows anythign about SQL Server to knock out of the park.Why the hell cant I right click on my database and save it as a .mdf? |
 |
|
|
SQLforGirls
Starting Member
48 Posts |
Posted - 2009-02-19 : 18:02:29
|
| Because that's not quite how the server works. You should already have an .MDF file which was created at the time you defined your database. If you did not specify the location of your Primary Filegroup when setting up the database, it most likely went to someplace like c:\mssql\data\dbname.mdfGet out of the SQL Server Management Studio or wherever you're working. Go to the windows file system and search for [dbname].MDF. It's there.Hope that helps. |
 |
|
|
spmchugh82
Starting Member
13 Posts |
Posted - 2009-02-19 : 18:21:42
|
| AH!Thank you SQLforGirls!I had already spent some time looking through the file system but I did an advanced search for .mdf and it finally came up at C:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\DataMan, that was quite the time waster.Tara, thanks for suspending my post. That was very helpful and classy! |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|