HighTechTalks DotNet Forums  

VS2005 - Questions about Data Sources window

Dotnet FAQs microsoft.public.dotnet.faqs


Discuss VS2005 - Questions about Data Sources window in the Dotnet FAQs forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
dbuchanan
 
Posts: n/a

Default VS2005 - Questions about Data Sources window - 12-01-2005 , 11:03 AM






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


Reply With Quote
  #2  
Old   
Bart Mermuys
 
Posts: n/a

Default Re: VS2005 - Questions about Data Sources window - 12-01-2005 , 12:34 PM






Hi,

"dbuchanan" <dbuchanan52 (AT) hotmail (DOT) com> wrote

Quote:
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


Quote:
Thank you,
dbuchanan





Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.