Home All Groups Group Topic Archive Search About

2.0 binding ObjectDataSource to Dataset

Author
7 Jan 2006 1:56 AM
GaryDean
I want to start out my question on a new thread.....

Create a new web app in vs 2005.
Add a dataset that has a 'Select Lastname from Employees' on the northwind
database to the App_Code folder
This generates a dataset1.xsd and a dataset1.xss file

Now, I want to connect that dataset to an ObjectDataSource that I dropped on
the Default.aspx page.

I am supposed to put the Class name of the dataset in the Typename property
of the ObjectDataSource.

What is the Class name?  How can I find it?

--
Regards,
Gary Blakely

Author
9 Jan 2006 5:41 AM
[MSFT]
Hello,

The Class name here shoule be a data component in the Dataset. Normally, we
can set this property with "Configure data source" wizard of
ObjectDataSource. (select the ObjectDataSource in designer and you can see
the little arrow on it to start  the wizard). You need to check the "Show
only data component" in the wizard and you will find a item like
"XXXXTableAdapter" in the dropdown list.

If we go deep into the XML file of DataSet1, we can found following line:

GeneratorDataComponentClassName="XXXXTableAdapter"

The string in the dropdown list comes from here. Anyway, we don't need find
it by ourslves since the wizard can find and list all components for us.

If there is anything unclear, please feel free to let me know.

Luke
Are all your drivers up to date? click for free checkup

Author
9 Jan 2006 5:41 PM
GaryDean
In my "real" project there is nothing in the dropdown but in this simplified
project it works fine.

thanks, this explains how it should work.
Gary

--
Regards,
Gary Blakely
Dean Blakely & Associates
www.deanblakely.com
Show quoteHide quote
"[MSFT]" <lukez***@online.microsoft.com> wrote in message
news:c48jb9NFGHA.3944@TK2MSFTNGXA02.phx.gbl...
> Hello,
>
> The Class name here shoule be a data component in the Dataset. Normally,
> we
> can set this property with "Configure data source" wizard of
> ObjectDataSource. (select the ObjectDataSource in designer and you can see
> the little arrow on it to start  the wizard). You need to check the "Show
> only data component" in the wizard and you will find a item like
> "XXXXTableAdapter" in the dropdown list.
>
> If we go deep into the XML file of DataSet1, we can found following line:
>
> GeneratorDataComponentClassName="XXXXTableAdapter"
>
> The string in the dropdown list comes from here. Anyway, we don't need
> find
> it by ourslves since the wizard can find and list all components for us.
>
> If there is anything unclear, please feel free to let me know.
>
> Luke
>
Author
10 Jan 2006 7:02 AM
Luke Zhang [MSFT]
Hello Gary,

Thank you for the reply. If you need further analyse on this issue, you may
post the XSD and xss file in your real project, I will take a look into it
to see if I can find some special.

Regards,

Luke

Bookmark and Share