Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Question about building a dataset...
Message
De
26/07/2002 16:58:22
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Question about building a dataset...
Divers
Thread ID:
00683156
Message ID:
00683156
Vues:
62
Well, thank goodness for re-installs. I was having problems for two days connecting to SQL Server, so I re-installed everything...IIS, .NET, SQL Server. Now all is right...

I've been trying to come up with a simple scheme any time my Winform needs to pull down multiple configuration files at once. I have a 'data broker' component that does all the talking back and forth to SQL.

Let's say I want to pull down 3 small files from SQL. I need them at load-time of a WinForm because they represent small pick-lists. So I'll package up a dataset with the requests for what I want, like so...

"SELECT RSNCODE,LONGDESCRIPT FROM RSNCODE"
"SELECT TYPECODE,LONGDESCRIPT FROM TYPECODE"
"SELECT STATCODE,LONGDESCRIPT FROM STATCODE"

I want my 'data broker' to bring back one dataset containing the results of each query...

I've made this 'work', but now I'd like to make it work well (i.e. more generic, fewer lines of code). The idea is that the data broker receives the dataset containing the requests, and does three queries to bring back the 3 results.

Basically, I'm creating a new dataadapter for the first query, and then doing subsequent 'fills' for each query after that. Ideally, I'd like to scan through the three (or four, or five) requests for data..but my code currently does something different for the first query in terms of creating the data adapter that it doesn't have to do on subsequent queries.

So in a nutshell, what would be the best approach (fewest lines of code) to do this?

Thanks,
Kevin
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform