Return Single Row + Dataset

M

Meir Rotfleisch

Hi

I have created a WebService that returns a DataSet from the database.

What I would like to do is have it also return an addition Single Row of
data that is generated during the processing of the function (lets say 3 or
4 differenet Values) that are not from a database source.

Suggestions? or Code Snippets would be greatly appreciated..


Regards

Meir
 
M

Manni

In the WS:
DataTable dT=new DataTable("TheOtherVals");
dT.Columns.Add("ColName", DbTyp.TheType);
dT.Columns.Add("ColNameXXX
.....
DataRow drNew=dT.NewRow();
dR["ColName"]="TheVal";
dR......
dT.Rows.Add(dR);

HTH

Manfred
 
M

Meir Rotfleisch

Manni said:
In the WS:
DataTable dT=new DataTable("TheOtherVals");
dT.Columns.Add("ColName", DbTyp.TheType);
dT.Columns.Add("ColNameXXX
.....
DataRow drNew=dT.NewRow();
dR["ColName"]="TheVal";
dR......
dT.Rows.Add(dR);

HTH

Manfred
 
M

Manni

I forgot to say you the rest:

DataSet DS=TheAllreadyExistingFunction();
.......
//code from last post
.......
DS.Tables.Add(dT);

Sorry -- but I think you could figure it out :))

Manfred

Meir Rotfleisch said:
Manni said:
In the WS:
DataTable dT=new DataTable("TheOtherVals");
dT.Columns.Add("ColName", DbTyp.TheType);
dT.Columns.Add("ColNameXXX
.....
DataRow drNew=dT.NewRow();
dR["ColName"]="TheVal";
dR......
dT.Rows.Add(dR);

HTH

Manfred
 

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

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top