How to modify an existing schema for a strongly typed dataset

Discussion in 'ASP .Net' started by socamb, Apr 3, 2008.

  1. socamb

    socamb Guest

    all,

    I need to do what seemes a simple task, but i am stuck. I have a
    column in my database i need to change from 7 chars to 10 chars. I
    have a number of strongly typed datasets in my system that use this
    table.

    I attempted to edit the xsd file in the designer and changed the 7 to
    a 10.

    But the underlaying class file did not get updated. When i searched
    for the column i need to change it still was set to 7.

    Then I attempted to run the "Table Adapter Configuration Widard". This
    actually broke the application and it would not compile. I then
    noticed that duplicate colmns appeared in the table in the dataset.
    For example there was ProjectId and ProjectId1. ProjectId1 did not
    exist before.

    I hope i am missing something simple here.

    I did change the code generated files to widen the columns in question
    and the app seemed to work ok, but i am sure this is not the prefered
    way to go,

    any help would be appreciated.
    socamb, Apr 3, 2008
    #1
    1. Advertising

  2. You have to regen the underlying classes or edit each one. There is a way to
    do it from the right click menu in the soultion explorer. In VS 2005, it was
    (for some reason) named custom tool. That may have been fixed in one of
    patches, however.

    --
    Gregory A. Beamer
    MVP, MCP: +I, SE, SD, DBA

    Subscribe to my blog
    http://gregorybeamer.spaces.live.com/lists/feed.rss

    or just read it:
    http://gregorybeamer.spaces.live.com/

    *************************************************
    | Think outside the box!
    |
    *************************************************
    "socamb" <> wrote in message
    news:...
    > all,
    >
    > I need to do what seemes a simple task, but i am stuck. I have a
    > column in my database i need to change from 7 chars to 10 chars. I
    > have a number of strongly typed datasets in my system that use this
    > table.
    >
    > I attempted to edit the xsd file in the designer and changed the 7 to
    > a 10.
    >
    > But the underlaying class file did not get updated. When i searched
    > for the column i need to change it still was set to 7.
    >
    > Then I attempted to run the "Table Adapter Configuration Widard". This
    > actually broke the application and it would not compile. I then
    > noticed that duplicate colmns appeared in the table in the dataset.
    > For example there was ProjectId and ProjectId1. ProjectId1 did not
    > exist before.
    >
    > I hope i am missing something simple here.
    >
    > I did change the code generated files to widen the columns in question
    > and the app seemed to work ok, but i am sure this is not the prefered
    > way to go,
    >
    > any help would be appreciated.
    Cowboy \(Gregory A. Beamer\), Apr 3, 2008
    #2
    1. Advertising

  3. socamb

    socamb Guest

    On Apr 3, 3:55 pm, "Cowboy \(Gregory A. Beamer\)"
    <> wrote:
    > You have to regen the underlying classes or edit each one. There is a way to
    > do it from the right click menu in the soultion explorer. In VS 2005, it was
    > (for some reason) named custom tool. That may have been fixed in one of
    > patches, however.
    >
    > --
    > Gregory A. Beamer
    > MVP, MCP: +I, SE, SD, DBA
    >
    > Subscribe to my bloghttp://gregorybeamer.spaces.live.com/lists/feed.rss
    >
    > or just read it:http://gregorybeamer.spaces.live.com/
    >
    > *************************************************
    > | Think outside the box!
    > |
    > *************************************************"socamb" <> wrote in message
    >
    > news:...
    >
    >
    >
    > > all,

    >
    > > I need to do what seemes a simple task, but i am stuck. I have a
    > > column in my database i need to change from 7 chars to 10 chars. I
    > > have a number of strongly typed datasets in my system that use this
    > > table.

    >
    > > I attempted to edit the xsd file in the designer and changed the 7 to
    > > a 10.

    >
    > > But the underlaying class file did not get updated. When i searched
    > > for the column i need to change it still was set to 7.

    >
    > > Then I attempted to run the "Table Adapter Configuration Widard". This
    > > actually broke the application and it would not compile. I then
    > > noticed that duplicate colmns appeared in the table in the dataset.
    > > For example there was ProjectId and ProjectId1. ProjectId1 did not
    > > exist before.

    >
    > > I hope i am missing something simple here.

    >
    > > I did change the code generated files to widen the columns in question
    > > and the app seemed to work ok, but i am sure this is not the prefered
    > > way to go,

    >
    > > any help would be appreciated.- Hide quoted text -

    >
    > - Show quoted text -


    Thanks, but i tried
    right click on the xsd file and "run custom tool".

    It did not do anything that i could see.
    socamb, Apr 3, 2008
    #3
    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. Narayanan Sankaranarayanan

    Custom Namespace For Strongly Typed DataSet

    Narayanan Sankaranarayanan, Dec 15, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    1,079
    Narayanan Sankaranarayanan
    Dec 15, 2004
  2. Imran

    Strongly Typed dataset

    Imran, Jan 23, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    564
    Richard A. Lowe
    Jan 23, 2004
  3. =?Utf-8?B?QW5kcmUgUmFuaWVyaQ==?=

    Help with creating strongly typed DataSet

    =?Utf-8?B?QW5kcmUgUmFuaWVyaQ==?=, Apr 19, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    505
    Rick Strahl [MVP]
    Apr 19, 2004
  4. Spotnick
    Replies:
    0
    Views:
    1,561
    Spotnick
    Jan 21, 2006
  5. Alan Silver
    Replies:
    2
    Views:
    647
    Alan Silver
    Jul 20, 2006
Loading...

Share This Page