Need quick and easy way to return an attribute based dataset from SP

M

moondaddy

I have a winforms app built on vb.net & vs2003, and all data access is via
webservices which call SPs on sql server 2k. For performance reasons I need
to make the datasets returned from the server as lean as possible so what I
have been doing is creating strongly typed datasets and then in the designer
I've made all rows attributes instead of elements. Then to reduce some of
the remaining 'un-needed' text in the dataset I've set the properties
attributeFormDefault and elementFormDefault to unqualified in the properties
window. then with the normal code I create an sql data adapter and use the
fill method with this data adapter and strongly typed dataset. This
produces the results that I want. The problem is that as the application
grow, I'm getting a lot of datasets in the designer (not to mention that
fact that I also need to manage a naming convention to keep all of these
datasets organized). And the only think most of these dataset are used for
is to assist in generating datasets with as little text as possible for
sending across the wire. They aren't used for validation or managing data
in anyway. It would be MUCH cleaner if I could generate these attribute
based datasets on the fly with out using strongly typed datasets.

Question: is it possible to create a dataset on the fly where all the rows
are elements and all the columns are attributes and populate it using the
fill method. I would need to define the element name of the rows such as
"r", and it would be ideal if the attribute names to be automatically named
after the column names returned by the sp. Is there a way to do this with
out a lot of code? Whether there is or isn't, what's the best way to do
this?

Thanks.
 
M

MSFT

Hello,

To create a strong typed dataset, you have to have a schema file in the
project. If you need to create a dataset at run time, you can consider a
unstrong typed dataset instead.

For more considers on performance of web service, you may refer to this
article:


XML Web Service Caching Strategies
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnservice/h
tml/service04172002.asp

Performance Comparison: Exposing Existing Code as a Web Service
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/
bdadotnetarch11.asp


Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top