Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Return either dataset or integer from function
Message
 
À
05/04/2004 11:10:37
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00892206
Message ID:
00897486
Vues:
23
Thank you all for your advice! Sorry for the delay on my response!

Nancy's advice caused me to re-think. I was trying to work out how my middle tier should operate, whether it should return datasets, or populate properties on the object etc. I like things to conform and I was going down a dead end trying to get everything working the same way!

I could see where a stored procedure was expected to return a single row of data that it would be fine just to populate properties on the object and expose them to the front end but when there are multiple rows I got to populating arrays on the object, which I thought would be OK for small amounts of data etc but it was then that I started getting myself confused!

I have re-created my stored procedures and clearly identifying those that return a single row and those that return multiple rows. Generally speaking I have got the middle tier returning a dataset, if there is a connection error or the stored procedure fails I set the dataset = nothing in the middle tier before I return it and then in the front end I test for isnothing(myDataSet) before I start populating controls which seems to work nicely.

I hope all that makes sense!

As I have been learning asp.net (I guess it is the same for any new language you learn...) I have been so conscious that through brute force I can "bend things" and get them to work but all the time I am not happy because I am convinced that that's not the way! I guess it all comes with time and experience!

Thanks again!
Chris Maiden
Email
Web
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform