VS2005 - Questions about Data Sources window

D

dbuchanan

Hello,

A section in Data Sources window is mystifying to me.

In the case of my code the Data Sources window shows my references to
the data access layer.

First here is what I see in my Data Sources window ...
([+] means expandable, [-] means expanded, [x] is a checked checkbox,
"QmsDataLayer" is the name of the referenced data layer.)

\\
{} QmsDataLayer
[+] DataSet1.lkpDeviceTypeDataTable
[+] DataSet1.lkpLaborCostCodeRateDataTable
[+] DataSet1.lkpOptionCategoryDataTable
[+] DataSet1.tbl050OptionDataTable
{} QmsDataLayer.DataSet1TableAdapters
[-] lkpDeviceTypeTableAdapter <<< What is this?
[x] ClearBeforeFill
//

1.) Why is only one TableAdapter represented in this section?
\\
{} QmsDataLayer.DataSet1TableAdapters
[-] lkpDeviceTypeTableAdapter
//

The references as shown in the Class View for this project shows all
the TableAdapters under "{} DataSet1TableAdapters"...
\\
[-] QmsUI
[-] References
[-] QmsDataLayer
[-] {} QmsDataLayer
[+] Class1
[+] DataSet1
[-] {} DataSet1TableAdapters
[+] lkpDeviceTypeTableAdaper
[+] lkpLaborCostCodeRateTableAdaper
[+] lkpOptionCategoryTableAdaper
[+] tbl050OptionTableAdaper
//

In other words, why don't I see this in the Data Sources window?...
\\
{} QmsDataLayer.DataSet1TableAdapters
[-] lkpDeviceTypeTableAdapter
[-] lkpLaborCostCodeRateTableAdapter
[-] lkpOptionCategoryTableAdapter
[-] tbl050OptionTableAdapter
//

2.) The one TableAdapter present has the option "ClearBeforeFill"
selected. With the others not present does that mean that I can only
have this feature available for the one TableAdapter?
\\
{} QmsDataLayer.DataSet1TableAdapters
[-] lkpDeviceTypeTableAdapter <<< What is this?
[x] ClearBeforeFill
//

Then there is this contradiction to consider. In my form(s) the
TableAdapters are identified as shown below and each of these has its
property "ClearBeforeFill" set to "True"
\\
DataSet11.LkpDeviceTypeTableAdapter1
DataSet11.lkpLaborCostCodeRateTableAdapter1
DataSet11.lkpOptionCategoryTableAdapter1
DataSet11.tbl050OptionTableAdapter1
//

4.) This brings me to the question... why the section "{}
QmsDataLayer.DataSet1TableAdapters" even present in the Data Sources
window? My first guess would be that it is brought in with the
reference to QmsDataLayer, but the class view of QmsDataLayer looks
like this...

\\
QmsDataLayer
[-] {} QmsDataLayer
[+] Class1
[+] DataSet1
[-] {} DataSet1TableAdapters
[+] lkpDeviceTypeTableAdaper
[+] lkpLaborCostCodeRateTableAdaper
[+] lkpOptionCategoryTableAdaper
[+] tbl050OptionTableAdaper
[+] ...
[+] ...
//

The presence of all the TableAdapters under "{}
DataSet1TableAdapters" brings me back to question #1 about why there
is only one TableAdapter shown under "{}
QmsDataLayer.DataSet1TableAdapters".

It is not because I haven't refreshed the Data Source window.

Does anyone have any explanation for all this?

Thank you,
dbuchanan
 
B

Bart Mermuys

Hi,

dbuchanan said:
Hello,

A section in Data Sources window is mystifying to me.

In the case of my code the Data Sources window shows my references to
the data access layer.

First here is what I see in my Data Sources window ...
([+] means expandable, [-] means expanded, [x] is a checked checkbox,
"QmsDataLayer" is the name of the referenced data layer.)

\\
{} QmsDataLayer
[+] DataSet1.lkpDeviceTypeDataTable
[+] DataSet1.lkpLaborCostCodeRateDataTable
[+] DataSet1.lkpOptionCategoryDataTable
[+] DataSet1.tbl050OptionDataTable
{} QmsDataLayer.DataSet1TableAdapters
[-] lkpDeviceTypeTableAdapter <<< What is this?
[x] ClearBeforeFill
//

1.) Why is only one TableAdapter represented in this section?
\\
{} QmsDataLayer.DataSet1TableAdapters
[-] lkpDeviceTypeTableAdapter
//

The references as shown in the Class View for this project shows all
the TableAdapters under "{} DataSet1TableAdapters"...
\\
[-] QmsUI
[-] References
[-] QmsDataLayer
[-] {} QmsDataLayer
[+] Class1
[+] DataSet1
[-] {} DataSet1TableAdapters
[+] lkpDeviceTypeTableAdaper
[+] lkpLaborCostCodeRateTableAdaper
[+] lkpOptionCategoryTableAdaper
[+] tbl050OptionTableAdaper
//

In other words, why don't I see this in the Data Sources window?...
\\
{} QmsDataLayer.DataSet1TableAdapters
[-] lkpDeviceTypeTableAdapter
[-] lkpLaborCostCodeRateTableAdapter
[-] lkpOptionCategoryTableAdapter
[-] tbl050OptionTableAdapter
//

2.) The one TableAdapter present has the option "ClearBeforeFill"
selected. With the others not present does that mean that I can only
have this feature available for the one TableAdapter?
\\
{} QmsDataLayer.DataSet1TableAdapters
[-] lkpDeviceTypeTableAdapter <<< What is this?
[x] ClearBeforeFill
//

Then there is this contradiction to consider. In my form(s) the
TableAdapters are identified as shown below and each of these has its
property "ClearBeforeFill" set to "True"
\\
DataSet11.LkpDeviceTypeTableAdapter1
DataSet11.lkpLaborCostCodeRateTableAdapter1
DataSet11.lkpOptionCategoryTableAdapter1
DataSet11.tbl050OptionTableAdapter1
//

4.) This brings me to the question... why the section "{}
QmsDataLayer.DataSet1TableAdapters" even present in the Data Sources
window? My first guess would be that it is brought in with the
reference to QmsDataLayer, but the class view of QmsDataLayer looks
like this...

\\
QmsDataLayer
[-] {} QmsDataLayer
[+] Class1
[+] DataSet1
[-] {} DataSet1TableAdapters
[+] lkpDeviceTypeTableAdaper
[+] lkpLaborCostCodeRateTableAdaper
[+] lkpOptionCategoryTableAdaper
[+] tbl050OptionTableAdaper
[+] ...
[+] ...
//

The presence of all the TableAdapters under "{}
DataSet1TableAdapters" brings me back to question #1 about why there
is only one TableAdapter shown under "{}
QmsDataLayer.DataSet1TableAdapters".

It is not because I haven't refreshed the Data Source window.

Does anyone have any explanation for all this?

I don't think those TableAdapters should be under Data Source Window, i
managed to get one tableadapter under it with a checkbox for
ClearBeforeFill, but this checkbox just represent what will be used when you
drag it to the Form. It's not to set the property or not.

So i would remove it. The question is how did you end up with this
TableAdapter under Data Sources ? The way i managed to get one there was to
choose "New Data Source", then "Object" and then select an already existing
TableAdapter. That was just for testing, you really shouldn't have
TableAdapters under Data Source .......

If you want to configure the TableAdapters, you need to get the project in
which they were created, open Data Sources window, click on your Typed
DataSet and right-click an then choose "Edit DataSet With Designer", you
should now see a visual representation of all the DataTable's and
TableAdapters which you can also configure.

"ClearBeforeFill" is a property which you can set using Properties Window on
an _instance_ of a TableAdapter that is on a Form or from code.

HTH,
Greetings
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top