1

I am really new on visual studio. I am using visual studio 2015 and only installed microsoft sql server 2008 pack 1.

So the problem goes like this, when I created a database.mdf and add new table it seems like something was not right there because after I created table, I cannot view list of the table (when I expanded the table folder) through server explorer. then noticed that inside my microsoft sql server 2008 pack 1 file, there was no SQL Server Database File. Only configuration tools.

Someone please tell me, what should I do? Am I need to re-install it or update it to the latest? or is there anything else I should install?

Ajay2707
  • 5,690
  • 6
  • 40
  • 58
Emerald
  • 864
  • 1
  • 14
  • 37

1 Answers1

0

You can not see mdf file in sqlserver side. The mdf file and table in used sqlexpress and accessible in visual studio too(sqlexpress was inbuilt installed with visual studio)

Eigher you can see in visual studio's server explorer (Ctrl + alt + s) or if you want in sqlserver, you open SSMS and connect sqlexpres as "yourpcname/sqlexpress"

How to connect to local instance of SQL Server 2008 Express

cannot connect to pc-name\SQLEXPRESS

https://msdn.microsoft.com/en-us/library/sxds9ett%28v=vs.90%29.aspx

To use this database and table use this connection string in web.config as

How do I connect to an .mdf (Microsoft SQL Server Database File) in a simple web project?

https://learningsqlserver.wordpress.com/2011/02/13/how-can-i-open-mdf-and-ldf-files-in-sql-server-attach-tutorial-troublshooting/

Community
  • 1
  • 1
Ajay2707
  • 5,690
  • 6
  • 40
  • 58
  • Thank you so much for your reply @Ajay2707 but all your suggestions are not solving my problem because I already did that all, like connecting to sql server database file. I can create a connection to the database and create table after database created. The problem is when I saved the table I created and tried to view it by expanding the table folder in server explorer, I cannot see it. No records found there. – Emerald Jul 25 '15 at 08:09
  • what are you not see, table or records? – Ajay2707 Jul 25 '15 at 09:04
  • both, table and table record – Emerald Jul 25 '15 at 11:25