Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing dataset by reference
Message
De
12/03/2012 15:42:12
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 2.0
Divers
Thread ID:
01538045
Message ID:
01538116
Vues:
30
Am I missing something?

Yes!!

ds != null is not the same as ds =! null (and, in fact, the latter will produce a compiler error). Maybe you need glasses? <vbg>

~~Bonnie


>>> Also 'ds = !null' is not valid syntax
>
>Why not? Getting back to my method that creates a data set. After the data set is created I need to rename the table inside this data set. So what I do is the following
>
>
>DataSet myDataSet = MyClass.FillDataSet( SqlCommand, out ErrorMessage);
>
>if (myDataSet != null )
>{
>    myDataSet.Tables[0].TableName = "myTableName";
>}
>else
>{
>     // add to the error message explanation
>    ErrorMessage = "Problem occurred. "  + ErrorMessage;
>}
>
>
>
>So far the above syntax has worked. Am I missing something? Thank you.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform