What Should You Do If You Want to Return a Recordset?

G

Geoff Robinson

Hi,

I need to create a web service which would return the equivalent of a
recordset. I was thinking about returning a dataset object, but I
would believe that is a .NET-only object. My web service may be
consumed by clients written in other platforms, like Java. Being
relatively new to web services, I wasn't exactly sure what to do.

thanks for any help in advance,
Geoff
 
L

Lakshmi Murthy

Hi Geoff

There is no method to return recordsets from a webservice but we have many tools used for converting datasets into record sets..Also you can programmatically convert them using XMLDocuments.XMLDocuments contain all the data and they can be used on any other platforms like Java

For more information on using XMLDocuments check the blog here.
http://weblogs.asp.net/jdanforth/archive/2003/11/17/38006.asp

Hope that help
Regard
Lakshmi
 
G

Geoff Robinson

what about returning it back as a array
I will look into that. Thanks for your insight.

Geoff
 
A

Ahsan Yar Khan

Hi

This one is fairly simple!.... u just need to do the following
<webmethod()
public function GetDatasetAsXMLString() as Strin

'get the information in dataset object

dim dsTest as DataSe

dsTest= 'some db stuff" 'may be u can call some stored procedure here and can fill the dataset

return dsTest.getXml 'return this as a string......this will be an xml string... the client side can handl
'it in the way it wants, client can convert the xml string back to dataset !
end functio
 

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

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top