views:

611

answers:

3

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

A: 

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

Mitch Wheat
That won't help him, because VC# insists on working with attached database files. The said dialog won't let him connect to the database from VC#.
Tor Haugen
If he's using the database directly instead of the drag-drop stuff that's good for demos and not much else then that will work fine.
Timothy Walters
+2  A: 

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.

Tor Haugen
Thanks Tor. That works. Have now idea what that means though. Is this the right way to develop a multi-user project? There will be more questions.... !
paul
Actually, I must say I think this sucks somewhat. I get a distinct feeling MS have crippled the express edition to nudge people towards paying for the full VS.
Tor Haugen
A: 

I find that strange as I have VSc# express 2005/8 and SQL express 2005/8 and BOTH can connect via connection string through the VSc# interface!

turtle