locked
tableadapter update problem RRS feed

  • Question

  • i made a tableadapter that get's data from multiple datatables. The select method works fine but now i want to have an update method so that the new data is stored in the original datatables. The problem is that he don't generate automaticly an update statement for this.

    can i do this manually ? This is my select statement and now i want to have an update statement for this that i can place in my new tableadapter

     

    SELECT     Car.CarID, Car.Name, Car.CategoryID, Category.CategoryID, Category.CategoryDescription
    FROM         Car INNER JOIN
                          Category Car.CategoryID = Category.CategoryID

     

                        

    Tuesday, January 23, 2007 9:43 AM

Answers

  • JohnBurton,

    Firstly, please make sure you have the authentication to modify the database. According to your description, it seems that you have not such a right to do this manipulating SQL statement. Using the sa or mixed authentication are both fine.

    Secondly, please use the TableAdapter control correctly. The following article shows how to update data using a TableAdapter and I hope that will help you with your problem:

    http://msdn2.microsoft.com/en-us/library/ms171933(VS.80).aspx

     

    Tuesday, January 30, 2007 2:56 AM

All replies

  • JohnBurton,

    Firstly, please make sure you have the authentication to modify the database. According to your description, it seems that you have not such a right to do this manipulating SQL statement. Using the sa or mixed authentication are both fine.

    Secondly, please use the TableAdapter control correctly. The following article shows how to update data using a TableAdapter and I hope that will help you with your problem:

    http://msdn2.microsoft.com/en-us/library/ms171933(VS.80).aspx

     

    Tuesday, January 30, 2007 2:56 AM
  • Hi Bruno Yu ...
    I'm facing the same problem as John.
    I followed your instructions and still i'm not getting update and delete statement from tableadapter wizard.

    How to grant "modify the database" in sql 2005 express?
    thanks heaps

    I am using Windows XP Sp2 , Visual Web developer express 2005 and sql express 2005.


    Monday, November 12, 2007 1:44 PM