This walkthrough shows you how to implement requery method using ISDataSource.
During this walkthrough, you will learn how to do the following:
- Connect to a Microsoft Access database using Microsoft Jet 4.0 OLE DB Provider.
- Use WebCombo's InitializeDataSource event to bind the DataSet.
Prerequisites
In order to complete this walkthrough, you will need the following:
- Access to the Microsoft Access Northwind database.
- Visual Studio 2005/2008/2010 Application.
Step-By-Step Instructions
To create new web application and implementing requery method using ISDataSource
- Drag two WebCombo instances from ToolBar to WebForm.
- Create a new DataSet and name it dsRequery.
- Drag Products and Categories table into the DataSet.
- Right click on the product table and choose Add Query.
- In TableAdapter Query Configuration Wizard, specify a SQL Select Statement "SELECT ProductID, ProductName, SupplierID, CategoryID, QuantityPerUnit, UnitPrice, UnitsInStock, UnitsOnOrder, ReorderLevel, Discontinued
FROM Products
WHERE (CategoryID = ?)" - Click the SmartTag on the upper right of the WebCombo.
- Set the DataTextField and DataValueField for WebCombo.
- In Choose Data Source field, choose <New data source...>.
- In Data Source Configuration Wizard, choose AccessDatabase and click next.
- Select the connection string in App_Data and click next.
- Select the table that you want to use, click next and finish afterwards.
- Run the project the combo will look like following.