Advanced SQL Generation Options in VS2005

Hi There

im not sure if im in the right place but i was wondering why the above option is greyed out when creating a new sql datasource. This occurs even when i select all fields within the table (including primary key fields)

Thanks
Todd



Answer this question

Advanced SQL Generation Options in VS2005

  • Tom_Miller

    Did anyone figure out how to resolve this I'm having the same problem....

  • justadam

    I have the same problem. I set the primary key in the table I'm trying to access to ArticlesID with the value of int, I select all the proper settings, but the Advanced SQL Options is still greyed out. I cannot seem to get this to work.

  • MikeGrozny

    I found that you have to make absolutely certain that you set the primary key correctly by right clicking on the column in the database, then you have to make sure you don't click the "show unique records" checkbox.

  • havoc27

    This also happened to me and it did not work even though I followed all of your suggestions. So, I closed the project and re-opened it again WITHOUT connecting to the database. I started the Configure Data Source and it LET me to select the options on the Advanced SQL Generation Options. Good luck!
  • inblosam

    How could you configure the data source without connecting to the database


  • Andrew Robinson

    This happened to me too, and I realized that setting the Column Property "Identity Specification" to Yes for the intended Primary Key field will not alone make it as a Primary Key. You have to right click on the Column and select "Set Primary Key" to enable the Advanced SQL Generations Options.

    Hope this information help with any newbie like me who made the same mistake. :-)


  • samno

    Ive had another crack at this & worked it out.

    For me i didnt have the primary key set in the sql database.

    Added that & its Happy Days

    Hope this helps.

    ToddBig Smile

  • happy man

    I'm not exactly sure which forum would be best for you  - you could try this one ...

    http://forums.microsoft.com/MSDN/ShowForum.aspx ForumID=7&SiteID=1 

    Donald



  • DNAGCAT

    limonada wrote:
    One thing I noticed is that the option is grayed out if the table used in the select statement has no primary key, which makes sense, since UPDATE and DELETE operations on a table without a primary key are very specific to the logic behing the table and cannot be generated automatically.

    This is what I found as well and it's worth mentioning again as I spent ages before realising what I was doing wrong. It is not enough to just have a primary key in the table, the primary key column MUST be part of the data you are retrieving/selecting otherwise the "Generate INSERT, UPDATE and DELETE statements" option will be greyed out in the advanced menu.


  • Marts

    Were you able to find an answer to this   I am having the same issue.

  • MichaelDeArmas

    One thing I noticed is that the option is grayed out if the table used in the select statement has no primary key, which makes sense, since UPDATE and DELETE operations on a table without a primary key are very specific to the logic behing the table and cannot be generated automatically.
  • gastonanthonyngke

    not yet
    Tongue Tied

  • Advanced SQL Generation Options in VS2005