Last post Aug 04, 2011 10:25 PM by steeve shah
May 09, 2007 09:39 AM|EJLindsay|LINK
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.
May 11, 2007 12:10 AM|Kevin Yu - MSFT|LINK
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.
May 11, 2007 05:50 AM|EJLindsay|LINK
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
May 11, 2007 11:11 AM|ilivewithian|LINK
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.
May 13, 2007 10:23 PM|Kevin Yu - MSFT|LINK
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!
Aug 04, 2011 10:25 PM|steeve shah|LINK
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?