mmDataAccessBase dao = this.GetDataAccessObject(); IDbDataParameter custIDParam = dao.CreateParameter("@CustID", custID); IDbDataParameter prodIDParam = dao.CreateParameter("@ProductID", productID); this.TableName = tableName; this.FillDataSet(this.GetCurrentDataSet(), sqlExecComm, tableName, custIDParam, prodIDParam);As you probably guessed, sqlExecComm is the SQL string, tableName is the name of the DataTable, and we're using 2 parameters for this query.
>>public virtual DataSet GetOrderByPK(int orderId, String tableName) >>{ >> >>DataSet dsOrders = this.GetCurrentDataSet(); >> >>String sql = "SELECT Orders.* FROM Orders WHERE uOrdID = @uOrdID "; >>mmDataAccessBase dao = this.GetDataAccessObject(); >>IDbDataParameter param = dao.CreateParameter("@uOrdID", orderId); >> >>this.FillDataSet(dsOrders,sql,tableName,param); >>return dsOrders; >>} >>>>