|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
2.0 binding ObjectDataSource to DatasetI 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 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 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 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 >
Other interesting topics
serialized binary files vs Sql Server Performance..
VS2005 - Unable to open local iis site other than localhost Book Recommendation Using ToolTip to store data Cache per Thread Moving an XML node up or Down Root URL/ Application path problem with running debugger .NET controls rendering Accessing GAC classes from a WebService? Apply new MasterPage to an existing page |
|||||||||||||||||||||||