In previous tutorials we most commonly made use of correlated subqueries because the Table Adapter cannot auto-generate s.While these values can be provided manually, when using ad-hoc SQL statements any customizations will be overwritten when the Table Adapter Configuration wizard is completed.With relational databases the data we are interested in working with is often spread across multiple tables. Supplier ID s and correlated subqueries can both be used to retrieve related data from other tables, many developers are left scratching their heads and wondering which approach to use.For example, when displaying product information we likely want to list each product s corresponding category and supplier s names. All of the SQL gurus I ve talked to have said roughly the same thing, that it doesn t really matter performance-wise as SQL Server will produce roughly identical execution plans.To retrieve data from two different tables we can use either a correlated subquery or a JOIN operation.
Therefore, it is feasible to create a Table Adapter whose main query uses a query for the Table Adapter s main query so that the corresponding insert, update, and delete stored procedures would be auto-created.
Jump directly to the latest New Features and Issues Addressed for the most recent General Availability Release.
Our latest hotfix (184.108.40.206) was released on Jan 23, 2018 and is a rollup of issues addressed since the last General Availability Release.
Second, change the Object Data Source s table, causing the delete to fail.
Figure 15: Deleting an Employee That has Corresponding Orders Results in a Foreign Key Constraint Violation (Click to view full-size image) To allow an employee to be deleted you could: s provide two different techniques for accessing data from related tables in a query.