Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to select a portion of a table???
Message
De
08/12/2003 17:56:16
Jason Mesches
Ocean Systems Engineering Corporation
Carlsbad, Californie, États-Unis
 
 
À
08/12/2003 16:50:31
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00856612
Message ID:
00857003
Vues:
24
You're welcome, Gordon. Glad you figured it out.
---J

>Thank you for your help. There seemed to be a number of things all rolled up into one big mess.
>
>1. Ensure you have the 'using OakLeaf.MM.Main.Data' declared to see the intellisense.
>
>2. Ensure the mmDropDownList object that requires the view, TempSite in my case, is pointing to it's respective view; dvNonOfficeSites. One object can point to the view and the other point to the table.
>
>BindingSource = Site (Tablename: not Site.dvNonOfficeSites)
>BindingSourceDisplayMember = Site.dvNonOfficeSites.description
>BindingSourceValueMember = Site.dvNonOfficeSites.code
>
>3. Ensure your data tables have the correct field length in the code table and main data table. (not my problem here)
>
>4. Ensure that the main data table has valid values. No blanks, no nulls, and any values that are listed in the main data table actually exists in the code table. (I replaced blanks with a valid 'NONE' code.)
>
>
>MY CODE IN MY "SITE" BUSINESS OBJECT
>
>--- USING NAMESPACES ---
>using System;
>using System.Data;
>
>using OakLeaf.MM.Main.Business;
>using OakLeaf.MM.Main.Data;
>
>
>--- METHODS ---
>public DataSet GetAllSites()
>{
>mmDataSet ds = (mmDataSet)this.GetDataSet("Select * From Site Order By Display_Order, Description");
>
>ds.Tables[this.TableName].DefaultView.Sort = "display_order,description";
>
>return ds;
>}
>
>protected override void HookPostGetData()
>{
>// Get the current DataSet
>mmDataSet ds = (mmDataSet)this.GetCurrentDataSet();
>
>// Create a custom DataView filtering out the 'Office' records
>DataView dv = new DataView(ds.Tables["Site"],"description not like '%Office%'","display_order,description",DataViewRowState.CurrentRows);
>
>ds.AddDataView(dv, "dvNonOfficeSites", "Site");
>}
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform