Wednesday, March 28, 2007

ASP.NET 2005 issues with creating object data adapter in design view

normally when i create a table adapter in design view, i will have this list on the last step
Generated SELECT statement.
Generated INSERT statement.
Generated UPDATE statement.
Generated DELETE statement.
Generated table mappings.
Generated Get method.
Generated Update methods.
How come when i use Authors Table in Pubs sample database to create a table adapter, the line "Generated DELETE statement." is missing? (which means that the delete statement wasnt generated)

It is because:
there was no PK set in the author table when i took it out of the Pub database
now with a defined PK (the AuthorID), all the statements were generated correctly.
The designer just didn't provide enough information explaning why some of the statements havn't been generated. maybe it's something need to be improved....

No comments: