Question

I have just installed VS C# Express 2008 which includes SQL Server Express 2008. It all went ok and I can see VS C# and SQL Server in the list of installed products.

When I start VS C# it looks fine but in the DB Explorer / Data Connection context menu the option 'Create new SQL Server Database' is disabled.

I have uninstalled all VS products and reinstalled but the problem remains. Do I need to do anything else?

Can anyone help?

Thanks

Was it helpful?

Solution

VC# seems to insist on using attached database files (*.mdf). This will keep your database local to your project rather than cluttering your SQL Server Express with databases.

You can create your database with the Add Connection... dialog, by choosing the Microsoft SQL Server Database File option. The database will reside in a file of your choosing. It works pretty well for any typical 'express' kind of project.

Note: If you use the SQL Management Studio Express to create a database in your SQLEXPRESS instance, you can still connect to it programatically by using the appropriate connection string.

OTHER TIPS

I would download SQL Server Management Studio Express and instead create your database in that.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top