GridView doesn't refresh schema after changes were made in bounded stored procedure

Discussion in 'ASP .Net' started by Orit, Jun 26, 2007.

  1. Orit

    Orit Guest

    Hi .

    I am creating an ASP.NET 2.0 web site and have the following problem :

    1. I have a GridView which bound to the object data source.
    2. This object data source is SQL Table adapter that I added to the
    data set via IDE .
    3. The method GetData of this table adapter uses existing stored
    procedure on my SQL 2005 server.
    4. Everything worked fine , until I made a changes to the stored
    procedure ( the new result dataset records have additional fields ) .

    The problem is :

    The new fields don't appear in the grid .
    Note : When I right click to the GetData method inside the table
    adapter and select "Preview Data" , it SHOWS the new fields retrieved
    by this sproc .
    I tried to press "Refresh schema" in all possible places - it didn't
    help .
    The only way I was able to solve the issue is to create a NEW table
    adapter , to add AGAIN all methods , to bind AGAIN the grid , to edit
    AGAIN all fields of the grid ....
    It looks like a IDE bug, or (hopefully) I am missing something ....


    I may need to change the sproc in the future , so I am looking for the
    way to see the changes in the grid WITHOUT doing all those steps
    above .

    Please advice !

    Thanks in advance ,
    Orit Chanukov .
    Orit, Jun 26, 2007
    #1
    1. Advertising

  2. Orit

    Masudur Guest

    On Jun 26, 11:21 pm, Orit <> wrote:
    > Hi .
    >
    > I am creating an ASP.NET 2.0 web site and have the following problem :
    >
    > 1. I have a GridView which bound to the object data source.
    > 2. This object data source is SQL Table adapter that I added to the
    > data set via IDE .
    > 3. The method GetData of this table adapter uses existing stored
    > procedure on my SQL 2005 server.
    > 4. Everything worked fine , until I made a changes to the stored
    > procedure ( the new result dataset records have additional fields ) .
    >
    > The problem is :
    >
    > The new fields don't appear in the grid .
    > Note : When I right click to the GetData method inside the table
    > adapter and select "Preview Data" , it SHOWS the new fields retrieved
    > by this sproc .
    > I tried to press "Refresh schema" in all possible places - it didn't
    > help .
    > The only way I was able to solve the issue is to create a NEW table
    > adapter , to add AGAIN all methods , to bind AGAIN the grid , to edit
    > AGAIN all fields of the grid ....
    > It looks like a IDE bug, or (hopefully) I am missing something ....
    >
    > I may need to change the sproc in the future , so I am looking for the
    > way to see the changes in the grid WITHOUT doing all those steps
    > above .
    >
    > Please advice !
    >
    > Thanks in advance ,
    > Orit Chanukov .


    Hi...

    its really very annoying ... but i didn't find any problem...
    okay just in case... swith to design view to html view and then again
    html view to design view...
    then press refresh schema in objectdatasource and then grid...

    Thanks
    Masudur
    http://munnacs.110mb.com
    Masudur, Jun 26, 2007
    #2
    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. DC Gringo
    Replies:
    1
    Views:
    2,169
    Scott Allen
    Sep 8, 2004
  2. Markus
    Replies:
    1
    Views:
    1,528
    Markus
    Nov 23, 2005
  3. Mike P
    Replies:
    0
    Views:
    3,298
    Mike P
    Jun 19, 2006
  4. Harry Bellafonte
    Replies:
    0
    Views:
    398
    Harry Bellafonte
    Nov 8, 2007
  5. Replies:
    6
    Views:
    152
Loading...

Share This Page