Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Newbie question - Strongly Typed DS
Message
De
15/10/2010 12:52:26
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
 
 
À
15/10/2010 12:47:20
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 3.0
Divers
Thread ID:
01485576
Message ID:
01485615
Vues:
41
>>>But ds.arcust is a DataTable.....
>>
>>His question was "How do access the dataset outside the method?". Now I am confused to so would be good to get a clarification.
>>Tim
>
>I was just responding to Craig's post re: return types.
>But reading between the lines I assumed Bill wanted intellisense for the returned DataTable outside of the method. I think Cetin gave the answer to that. But if Bill did want to have intellisense available for the *dataset* elsewhere then it would also be better to cast that when required rather than by widening the visibility scope of the dataset instance ?

True, just depends on what he wants or is trying to do. Lots of options. His question was how to access the DataSet outside the method but was scoping it inside without returning it. I guess I just responded to what was on the surface and figured he would go "oh, duh". but then assuming too much gets one in trouble. :-)
Tim

>
>
>>>
>>>>I'm confused. Method signature says it returns a DataTable, but ds is defined a meycotestDataSet?
>>>>
>>>>>Here's a newbie question
>>>>>
>>>>>I'm using strongly typed dataset I can use intellisense to access the columns nicely as long as I do it in the method that
>>>>>creates the dataset, as follows:
>>>>>
>>>>>
>>>>>
>>>>>  public DataTable EstablishBlankCustomerData()
>>>>>    {
>>>>>      meycotestDataSet ds = new meycotestDataSet();
>>>>>      ds.arcust.Rows.Clear();
>>>>>      ds.arcust.Rows.Add();
>>>>>      ds.arcust[0].country = "USA";
>>>>>      ds.arcust[0].currency = "USD";
>>>>>      ds.arcust[0].nocable = "N";
>>>>>      ds.arcust[0].nopump = "N";
>>>>>      ds.arcust[0].oringsvssnaps = "N";
>>>>>      ds.arcust[0].quomeycolite = "N";
>>>>>      ds.arcust[0].quoruggedmesh = "N";
>>>>>      ds.arcust[0].quosoliddrain = "N";
>>>>>      ds.arcust[0].quosolidpump = "N";  
>>>>>      return ds.arcust;     
>>>>>    }
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>I can't figure out how to get intellisense to work when I access the dataset outside that method.
>>>>>
>>>>>I tried returning the dataset but that doesn't seem to work
>>>>>
>>>>>Am I missing something?
Timothy Bryan
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform