Cannot get nutshell mdf to work
I have followed the directions from readme below
// If you don't have SQLExpress installed, the connection on the left will display in red
// and this query will throw an exception. This might be the case if you have installed
// the full-blown SQL Server instead of SQLExpress. The solution is to create your own
// database as follows:
//
// 1. Right-click "Nutshell.mdf" on the left, and choose "Edit".
rem There is no "Edit" to choose! Did you mean "Properties" ?
// 2. Select an empty database (or create a new one) on a server of your choice.
// 3. Click "Remember this connection" and OK
// 4. Execute the "Populate Demo Database" script in the next example.
What can I do since there is no "Edit" to click on?
I am running Windows 7 professional and have Visual Studio 2013 professional installed and working as it should, as far as I know. I can send screen copies, if you wish.
thanks
// If you don't have SQLExpress installed, the connection on the left will display in red
// and this query will throw an exception. This might be the case if you have installed
// the full-blown SQL Server instead of SQLExpress. The solution is to create your own
// database as follows:
//
// 1. Right-click "Nutshell.mdf" on the left, and choose "Edit".
rem There is no "Edit" to choose! Did you mean "Properties" ?
// 2. Select an empty database (or create a new one) on a server of your choice.
// 3. Click "Remember this connection" and OK
// 4. Execute the "Populate Demo Database" script in the next example.
What can I do since there is no "Edit" to click on?
I am running Windows 7 professional and have Visual Studio 2013 professional installed and working as it should, as far as I know. I can send screen copies, if you wish.
thanks
Comments
To create a db is simple. Following along in the Linqpad 5 min... tutorial, I got to the query "What about.." and didn't have Northwind (NORTHWND) db. So, I moved on to the next one which essentially told me to "create" it. LOL. Talk about self-referential. If I knew how to create it, would I need the tutorial? Oh, well... OK, here is what I did (and I hope it is correct, I'm a bit uneasy in my use of the master db, in my profound ignorance, but it worked, so...)OK. You've located a db engine and know its path. So you can click on the "Add connection" in the left-hand window and connect to it. It should populate a tree of db's, one of which must be (I think) master. So, in a new query (from the file menu) choose SQL as the language (above the query window) and master as the connection. Then type "create database
OK? You're done. You can go on to execute the tutorial query "But I don't have..." and then the previous one. Right? Wrong. Frustrating BUG in Linqpad! After you do that you have to close down Linqpad. Then reopen it. Under the connections, you should now see NORTHWND_stub (or whatever name you chose). And you can go on to use it as the connection (above the query) and execute the "But I..." and then the "What about..." queries. BTW, there's no need to save the query which created the db. Hope this helps.