SQLDataSource Configuration not allowing Update, Delete or Insert

Discussion in 'ASP .Net' started by mosscliffe, Apr 28, 2006.

  1. mosscliffe

    mosscliffe Guest

    I created a new table in Visual Web Developer for SQL Server Express
    2005. I created a 'gridview' by dragging the table onto an empty web
    form in Visual Developer Express.

    Clicked on the smart tag 'configure data source'. When I click Advanced
    should see
    the Generate Insert, Update and Delete statements check box but it is
    greyed
    out. It isn't in all the video tutorials I have watched.

    Tried to repeat with various new tables, but it always gives the same
    result.

    Activated the edit button on GridView and it allowed me to edit the
    record, but it will not update as DataSource not configured for UPDATE.

    What can I be doing wrong ? I am guessing it is a property or a
    permission, but permissions not normally a problem in windows

    Help my Test Host expires on Microsoft tomorrow and I can not even get
    to edit an existing table at local level, never mind test how to upload
    and execute on a real host.

    Any help appreciated

    Richard
     
    mosscliffe, Apr 28, 2006
    #1
    1. Advertising

  2. mosscliffe

    mosscliffe Guest

    If it is any help, the same problem occurs with an AccessDataSource !!!
     
    mosscliffe, Apr 28, 2006
    #2
    1. Advertising

  3. The usual reason for this is that you have not included the primary key in
    the Select statement so it cannot autonatically generate corresponding
    Insert, Update and Delete statements.

    You can still do it all yourself though.

    "mosscliffe" wrote:

    > I created a new table in Visual Web Developer for SQL Server Express
    > 2005. I created a 'gridview' by dragging the table onto an empty web
    > form in Visual Developer Express.
    >
    > Clicked on the smart tag 'configure data source'. When I click Advanced
    > should see
    > the Generate Insert, Update and Delete statements check box but it is
    > greyed
    > out. It isn't in all the video tutorials I have watched.
    >
    > Tried to repeat with various new tables, but it always gives the same
    > result.
    >
    > Activated the edit button on GridView and it allowed me to edit the
    > record, but it will not update as DataSource not configured for UPDATE.
    >
    > What can I be doing wrong ? I am guessing it is a property or a
    > permission, but permissions not normally a problem in windows
    >
    > Help my Test Host expires on Microsoft tomorrow and I can not even get
    > to edit an existing table at local level, never mind test how to upload
    > and execute on a real host.
    >
    > Any help appreciated
    >
    > Richard
    >
    >
     
    =?Utf-8?B?Y2xpY2tvbg==?=, Apr 28, 2006
    #3
  4. mosscliffe

    mosscliffe Guest

    Genius - I did not even have a primary key specified - now rectified
    and all working.

    Many, many thanks

    Richard
     
    mosscliffe, Apr 28, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jesse Liberty
    Replies:
    4
    Views:
    5,201
    SoftwareLogic
    Nov 22, 2011
  2. Jason
    Replies:
    2
    Views:
    1,032
    Jason
    Nov 12, 2006
  3. Luqman
    Replies:
    5
    Views:
    1,428
    luqman
    Nov 22, 2007
  4. Jason
    Replies:
    0
    Views:
    264
    Jason
    Nov 12, 2006
  5. masmith
    Replies:
    1
    Views:
    944
    masmith
    Feb 20, 2009
Loading...

Share This Page