Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: parse data question

Reply
Thread Tools

Re: parse data question

 
 
Karl
Guest
Posts: n/a
 
      08-26-2004
I'm not sure what kind of form your web service is returning the data in.
I'll assume it's a dataset/datable. You can either use the SELECT command
of a datatable, or the RowFilter or a Dataview...one returns an array of
DataRows which is great for simply looping...and the Dataview is ideal for
binding.

Dim rows() as DataRow = ds.tables(0).Select("Type = 1")
dim dv as DataView = ds.tables(0).DefaultView
dv.RowFilter = "Type = 1"


Karl

"IGotYourDotNet" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I wrote a web service that connects to the db and executes all the SP's

and i
> have all the data being displayed in grids, - easy. Now I'm at a brain

freeze.
>
> I'm calling a method in the web service to execute a SP and when the data

is
> returned I need to parse out the only certain dataitems from the dataset
> being returned from the web service.
> Any ideas on how to do that?
>



 
Reply With Quote
 
 
 
 
Karl
Guest
Posts: n/a
 
      08-26-2004
Oh, you don't want to filter the rows, you want to filter the columns. I
imagine you are using a datalist with AutoGenerateColumns=true (the
default). You could delete the columns from the dataset, but a better
alternative would be to set the autogeneratecolumns to false and bind it
yourself

Something like:
<aspataGrid ID="list" Runat="server" AutoGenerateColumns="False">
<Columns>
<asp:BoundColumn datafield="make" />
<asp:BoundColumn datafield="model" />
</Columns>
</aspataGrid>

or use a datalist/repeater and do something similar with the ItemTemplate.

Karl


"IGotYourDotNet" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> the service is returning a dataset such as
>
> <car>
> <make>Chevy</make>
> <model>Corvette</model>
> <year>2005</year>
> <color>red</red>
> </car>
>
> I would only want make and model to display on my page
>
>
> "Karl" wrote:
>
> > I'm not sure what kind of form your web service is returning the data

in.
> > I'll assume it's a dataset/datable. You can either use the SELECT

command
> > of a datatable, or the RowFilter or a Dataview...one returns an array of
> > DataRows which is great for simply looping...and the Dataview is ideal

for
> > binding.
> >
> > Dim rows() as DataRow = ds.tables(0).Select("Type = 1")
> > dim dv as DataView = ds.tables(0).DefaultView
> > dv.RowFilter = "Type = 1"
> >
> >
> > Karl
> >
> > "IGotYourDotNet" <(E-Mail Removed)> wrote in

message
> > news:(E-Mail Removed)...
> > > I wrote a web service that connects to the db and executes all the

SP's
> > and i
> > > have all the data being displayed in grids, - easy. Now I'm at a brain

> > freeze.
> > >
> > > I'm calling a method in the web service to execute a SP and when the

data
> > is
> > > returned I need to parse out the only certain dataitems from the

dataset
> > > being returned from the web service.
> > > Any ideas on how to do that?
> > >

> >
> >
> >



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
optparse: parse v. parse! ?? 7stud -- Ruby 3 02-20-2008 05:20 AM
How to parse a string like C program parse the command line string? linzhenhua1205@163.com C Programming 19 03-15-2005 07:41 PM
Question: need to parse web pages to extract data Troll Perl Misc 3 11-01-2004 09:39 PM
Parse Java Applet screen for data from .NET environment Weston Weems ASP .Net 0 08-26-2004 11:18 PM
DocumentBuilder.parse don't get data from InputSource David Java 0 05-27-2004 03:53 PM



Advertisments