Register     Login

Search

Running the Script to Create Your Database

Jan 16

Written by:
Monday, January 16, 2012 1:18 PM  RssIcon

I knew that I'd seen the error some time back (I was playing with the script option at the time), but for the life of me I coudn't remember how to turn on SQLCMD Mode, so that the script would be allowed to run.

I was looking for an icon that I recognised, or a menu option that would jump out at me at the answer. Googling while I had the person trying to install the database was proving unhelpful, so I suggested that I hang up, & have a look around on my own.

It worked! I found the answer fairly quickly, once I started using the right search terms. D'uh!

It turns out that the icon I was looking for had been removed after SQL Server 2005 (no wonder I couldn't find it, lol), and that the menu with the required menu item in it ONLY appears when you're IN the query. Intuituve, once you find it and realise that it does actually make sense. You just have to hold your tongue the right way, right?

So. Once you have the query window open, a Query menu appears (see I said it was intuitive once you knew the trick to finding it). In that menu is a SQLCMD option. So to run the LightSwitch-generated script, click that option, and every works.

See Editing SQLCMD Scripts with Query Editor for details.

I vowed that I'd blog it this time, becuase it took SO long to find the answer. I knew it was a simple thing. And I knew that I KNEW the answer. I just couldn't think of it when I needed it.


Your name:
Gravatar Preview
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Title:
Comment:
Security Code
CAPTCHA image
Enter the code shown above in the box below
Add Comment   Cancel 
Home   |   Blogs   |   Books   |   Extensions   |   Donations   |   About LightSwitch   |   About Me
Privacy Statement    |   Terms Of Use

Copyright 2011 by Yann Duran