public DataSet GetOrdersByCustomerAndEmployee(string custID, int employeeID) { // Get a reference to the data access object mmDataAccessBase dao = this.GetDataAccessObject(); // Create and configure two parameter objects IDbDataParameter param1 = dao.CreateParameter("@CustomerID", custID); IDbDataParameter param2 = dao.CreateParameter("@EmployeeID", employeeID); // Get a DataSet filled with the result set return this.GetDataSet("SELECT * FROM Orders WHERE CustomerID = @CustomerID AND " + "EmployeeID = @EmployeeID", param1, param2); }And in VB .NET:
Public Function GetOrdersByCustomerAndEmployee(ByVal custID As String, ByVal employeeID As Integer) As DataSet ' Get a reference to the data access object Dim dao As mmDataAccessBase = Me.GetDataAccessObject() ' Create and configure two parameter objects Dim param1 As IDbDataParameter = dao.CreateParameter("@CustomerID",custID) Dim param2 As IDbDataParameter = dao.CreateParameter("@EmployeeID",employeeID) ' Get a DataSet filled with the result set Return Me.GetDataSet("SELECT * FROM Orders WHERE CustomerID = @CustomerID AND " + "EmployeeID = @EmployeeID", param1, param2) End FunctionRegards,