Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GetDataSet method and mutltiple result sets
Message
De
10/08/2009 17:53:46
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
 
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01416914
Message ID:
01417209
Vues:
38
This message has been marked as a message which has helped to the initial question of the thread.
>I found this code
>
>http://www.devx.com/codemag/Article/33658/1763?supportItem=1
>
>and was able to figure it out, thanks again.
>
>My last remaining piece is to pass parameters correctly to the Biz Object GetDataSet method. I need to look at some documentation here, I believe.
>

If you type this.GetDataSet and then the left paren you will see all the options in the overloads. If you are consistently using stored procedures you can set the DefaultCommandType in the ABusines object and then you don't have to pass that in. You could for instance call GetDataSet passing in the name of your stored procedure, the name of the table you want in your return ds and some parameters
public DataSet GetSpecialReportData(string someVal1, string someVal2, string someVal3)
{
     return this.GetDataSet("MyDataSelectBySomeVal", "MyTableName",
          this.CreateParameter("@Val1", someVal1),
          this.CreateParameter("@Val2", someVal2),
          this.CreateParameter("@Val3", someVal3));
}
Timothy Bryan
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform