2.0 binding ObjectDataSource to Dataset

G

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?
 
M

[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
 
G

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
 
L

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
 

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,989
Messages
2,570,207
Members
46,783
Latest member
RickeyDort

Latest Threads

Top