locked
Visual Studio 2013 Lightswitch Vision Clinic Application Documentation bug. RRS feed

  • Question

  • On the webpage

    Walkthrough: Creating the Vision Clinic Application in LightSwitch

    Visual Studio 2013

    at

    http://msdn.microsoft.com/en-us/library/ee256749.aspx

    it states

    "Before you perform this step, you must download the PrescriptionContoso database from MSDN Code Gallery and then install the database by following the instructions in the Install.htm file."

    In the Install.htm file it states

    "From an elevated command prompt, switch to the C:\Temp directory and type

    sqlcmd -S .\SQLExpress -i attachContoso.sql

    ."

    This does not work with Visual Studio 2013 Pro. The required command line is

    sqlcmd -S (localdb)\v11.0 -i attachContoso.sql

    Tuesday, December 10, 2013 8:26 AM

Answers

  • So, yes, the 2013 sample is incorrect.

    I was going off of what's based in the article that was provided by the OP (which links to the 2012 sample, which it should point to the 2013 sample) and the MSDN Code Gallery link provided by the OP.

    I'll notify the team to update the documentation and sample.


    Justin Anderson, LightSwitch Development Team

    • Marked as answer by Robert Wishlaw Tuesday, December 10, 2013 9:41 AM
    Tuesday, December 10, 2013 9:21 AM
    Moderator

All replies

  • I just downloaded the samples for both languages and they do say "sqlcmd -S (localDB)\v11.0 -i C:\Temp\attachContoso.sql"


    Justin Anderson, LightSwitch Development Team

    Tuesday, December 10, 2013 8:42 AM
    Moderator
  • Here's the full text of the Install.htm file:

    LightSwitch Walkthrough Sample

    This download consists of the PrescriptionContoso SQL database, and installation script, and a copy of the sample application that is built by following the steps in the topic Walkthrough: Creating the VisionClinic Application http://msdn.microsoft.com/en-us/library/ee256749.aspx.

    To install the database:

    1.  In Windows Explorer, copy the PrescriptionContoso.mdf  and attachContoso.sql files to the C:\Temp directory. Please note that if you place the files in a directory with a different name, you will also need to change it in the attachContoso.sql script and in several steps in the walkthrough.

    2.  From an elevated command prompt, switch to the C:\Program Files\Microsoft SQL Server\110\Tools\Binn\ directory and type:

     sqlcmd -S (localDB)\v11.0 -i C:\Temp\attachContoso.sql

    The PrescriptionContoso sample database will be installed in SQL Server Express and will be available for use from LightSwitch.

    Errata

    In the section “Connect to a Database”, step 5 instructs you to set the Server Name value to .\SQLExpress. In Visual Studio 2011 Beta, this value should be (localdb)\v11.0.


    Justin Anderson, LightSwitch Development Team

    Tuesday, December 10, 2013 8:45 AM
    Moderator
  • I just downloaded the samples for both languages and they do say "sqlcmd -S (localDB)\v11.0 -i C:\Temp\attachContoso.sql"


    Justin Anderson, LightSwitch Development Team

    Can you give me the link for these downloads please?

    Thank you.

    Tuesday, December 10, 2013 8:57 AM
  • It's the same exact link that you provided: MSDN Code Gallery.

    Justin Anderson, LightSwitch Development Team


    Tuesday, December 10, 2013 9:07 AM
    Moderator
  • The OP is correct, the C# and VB.net "Install.htm" file in the respective code folders instruct the user to attach to SQLExpress not localDB.

    This is, as of 1 minute ago, also what is found on the download site under "Install.htm" for C# and VB.net via the solution explorer.  There is no errata to indicate otherwise.

    The LightSwitch team should be so kind as to update this file on the MSDN site to avoid future confusion.


    Tuesday, December 10, 2013 9:07 AM
  • That is not the link for VS2013, it is for VS2012.  To reiterate, the link to the VS2013 Vision Clinic sample, including the outdated SQLExpress database instructions that needs updating, is in my previous post.

    Tuesday, December 10, 2013 9:15 AM
  • So, yes, the 2013 sample is incorrect.

    I was going off of what's based in the article that was provided by the OP (which links to the 2012 sample, which it should point to the 2013 sample) and the MSDN Code Gallery link provided by the OP.

    I'll notify the team to update the documentation and sample.


    Justin Anderson, LightSwitch Development Team

    • Marked as answer by Robert Wishlaw Tuesday, December 10, 2013 9:41 AM
    Tuesday, December 10, 2013 9:21 AM
    Moderator
  • I just downloaded the samples for both languages and they do say "sqlcmd -S (localDB)\v11.0 -i C:\Temp\attachContoso.sql"


    Justin Anderson, LightSwitch Development Team

    I downloaded from the web page

    LightSwitch in Visual Studio 2013 Vision Clinic Walkthrough & Sample

    at

    http://code.msdn.microsoft.com/LightSwitch-in-Visual-0ae6349d

    I just redownloaded both examples to double check and the install.htm file is as I stated containing the text

    sqlcmd -S .\SQLExpress -i attachContoso.sql

    Robert Wishlaw 

    Tuesday, December 10, 2013 9:25 AM
  • I was tripped up by the same problem initially when I tried following the SQLExpress instruction for the VS2013 sample, but ended up using SSMS to attach the database instead.  I did not however, take the time to help correct the error here.

    Thanks to the OP for bringing the error to the forums, and to Justin for providing the solution going forward.


    Tuesday, December 10, 2013 9:29 AM
  • So, yes, the 2013 sample is incorrect.

    I was going off of what's based in the article that was provided by the OP (which links to the 2012 sample, which it should point to the 2013 sample) and the MSDN Code Gallery link provided by the OP.

    I'll notify the team to update the documentation and sample.


    Justin Anderson, LightSwitch Development Team

    Yes the link, from the Visual Studio 2013 documentation page is to the Visual Studio 2012 example, not the Visual Studio 2013 example.

    Thank you for your help correcting this.

    Robert Wishlaw


    Tuesday, December 10, 2013 9:38 AM