locked
Table Adapters RRS feed

  • Question

  • User-1387982746 posted

    I set a a table adapter using already created stored procedures.  I selected the option "create methods to send updates directly to the database....".  Everything works.

     Now I added a column to a table and I add that column to the various stored procedures - update, insert, select.

    I now tried to re-configure the table adapter to take into account this new column.  I cannot get the wizard to re-create the insert and update methods the access the database directly.  I have tried several things and the only way I can get the methods with the added column is to delete the table adapter and re-do everything.

     How can I do a simply re-configure of a table adapter to take into account a newly added column to a table.

     Jay

    Wednesday, May 9, 2007 9:39 AM

Answers

  • User-1506829456 posted

    Sorry, Jay. Since you're selecting from a stored procedure, the only way I can think of is to remove and re-add the TableAdapter.

    HTH. If this does not answer your question, please feel free to mark the post as Not Answered and reply. Thank you!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, May 13, 2007 10:23 PM

All replies

  • User-1506829456 posted

    Hi,

    This depends on how your SQL query is written in the wizard.

    If you use "SELECT *", just go through the wizard again to have it re-generate the TableAdapter code.

    If you use "SELECT Column1,Column2", you will need to add the new column name in the sequence and go through the wizard.

    Friday, May 11, 2007 12:10 AM
  • User-1387982746 posted

    Thanks, but as I indicated I am using stored procedures -- not sql defined in the wizard.  Also, as I indicated I of course added the new column to the relevant stored procedures.  I then re-ran the wizard and was not able to generate the new code for the insert and update methods that access the database directly that include the new column.

     Jay

    Friday, May 11, 2007 5:50 AM
  • User-653715245 posted

    I do the same thing that you are doing quite a lot, I've found that to get the table adapter to pick up the extra columns I must first reconfigre the method topmost in the list of methods. I've also found that manually tinkering with teh columns confuses the wizard. Unless it's hugely complex you could always drop the table adapter that you have from your project and start again.

    Friday, May 11, 2007 11:11 AM
  • User-1506829456 posted

    Sorry, Jay. Since you're selecting from a stored procedure, the only way I can think of is to remove and re-add the TableAdapter.

    HTH. If this does not answer your question, please feel free to mark the post as Not Answered and reply. Thank you!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, May 13, 2007 10:23 PM
  • User-1029537036 posted

    I have just created a photography website Template and wanted to do the same thing. Would it be the same procedure or, is there something different?

    Thursday, August 4, 2011 10:25 PM