TableAdapter Configuration Wizard - Advanced Options

FreeriderUK

Well-known member
Joined
Jun 27, 2006
Messages
100
Location
London
Programming Experience
10+
Hi all,

I'm using MS Access DB with VS2008.

In the TableAdapter Configuration Wizard, the default Fill query looks like the pic below.

The problem is, I want to create a new query, but when I do, the Advanced Options button is missing (I need to generate Insert, Updates & Delete statements).

Why would this be happening?
Is there a setting I need to change somewhere?

Thanks.
 

Attachments

  • Picture 1.png
    Picture 1.png
    24.4 KB · Views: 36
When you add an additional, new query to an existing tableadapter, it is not intended to be the base line SELECT that is used to determine the structure of the related DataTable.. As such you can regard tableadapters as devices that have 4 primary queries.. the initial SELECT (which can be parameterised and ought to include the PK if the table has one) and 3 related I U and D queries.
Any other queries are designed to be for related or interesting subsets of data that will fit in the main table structure but have a varied or unhelpful selection criteria..

Your primary SELECT wll e.g. select a specific Order based on its orderID [pk]. Your ancilliary query might select all orders over 2 months old that are unpaid. Because the main query selects the order data and hence determine what can be dragged into and pushed out of the datatable, it is used to determine the I U and D queries. It is then intended that all your ancilliary queries drag data into the table under special conditions (such as old, unpaid orders) but any changes to that data is persistable via the main I U D queries


i,e. atableadapter only needs one set of I U D, and you already generated them, so youre not offered the option of generating more
 
Thanks cjard - nice explanation.

The reason I posted this question was because it seemed the database wasn't saving the changes made in the dataset. Turns out it was.

The problem came from the fact I was re-filling the dataset using a filter which didn't include the new data!
 
Back
Top