468,268 Members | 1,747 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,268 developers. It's quick & easy.

Passing record to a webmethod

Hi

Is it possible to pass a whole record to a webmethod? How?

Thanks

Regards
Dec 27 '05 #1
5 1421
Hi,

depends what you are passing. Web service method could certainly take a
custom class as argument, populated with data from the "record" or array of
records.

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke

"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Hi

Is it possible to pass a whole record to a webmethod? How?

Thanks

Regards

Dec 27 '05 #2
Can they take a dataset as parameter?

Thanks

"Teemu Keiski" <jo****@aspalliance.com> wrote in message
news:et**************@TK2MSFTNGP14.phx.gbl...
Hi,

depends what you are passing. Web service method could certainly take a
custom class as argument, populated with data from the "record" or array
of records.

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke

"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Hi

Is it possible to pass a whole record to a webmethod? How?

Thanks

Regards


Dec 27 '05 #3
Yes, they can.

Have you tried? It is a quick test, and then you don't have to ask on the
newsgroup and wait for responses.

"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:OX**************@tk2msftngp13.phx.gbl...
Can they take a dataset as parameter?

Thanks

"Teemu Keiski" <jo****@aspalliance.com> wrote in message
news:et**************@TK2MSFTNGP14.phx.gbl...
Hi,

depends what you are passing. Web service method could certainly take a
custom class as argument, populated with data from the "record" or array
of records.

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke

"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Hi

Is it possible to pass a whole record to a webmethod? How?

Thanks

Regards



Dec 27 '05 #4
OK, a real question. :)

When a webmethod gets a dataset as parameter as below, how can the webmethod
insert the dataset into a local table?

<WebMethod()> Public Sub ClearEvent(ByVal Events As Data.DataSet)

Thanks

Regards

"Marina" <so*****@nospam.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Yes, they can.

Have you tried? It is a quick test, and then you don't have to ask on the
newsgroup and wait for responses.

"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:OX**************@tk2msftngp13.phx.gbl...
Can they take a dataset as parameter?

Thanks

"Teemu Keiski" <jo****@aspalliance.com> wrote in message
news:et**************@TK2MSFTNGP14.phx.gbl...
Hi,

depends what you are passing. Web service method could certainly take a
custom class as argument, populated with data from the "record" or array
of records.

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke

"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Hi

Is it possible to pass a whole record to a webmethod? How?

Thanks

Regards



Dec 27 '05 #5
This question has been asked many times, I recommend you do some research on
Google groups. The fact that this is happening through a web service is
irrelevant, it is really about how to insert a given set of rows into a
database table.
"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:eT**************@TK2MSFTNGP15.phx.gbl...
OK, a real question. :)

When a webmethod gets a dataset as parameter as below, how can the
webmethod insert the dataset into a local table?

<WebMethod()> Public Sub ClearEvent(ByVal Events As Data.DataSet)

Thanks

Regards

"Marina" <so*****@nospam.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Yes, they can.

Have you tried? It is a quick test, and then you don't have to ask on the
newsgroup and wait for responses.

"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:OX**************@tk2msftngp13.phx.gbl...
Can they take a dataset as parameter?

Thanks

"Teemu Keiski" <jo****@aspalliance.com> wrote in message
news:et**************@TK2MSFTNGP14.phx.gbl...
Hi,

depends what you are passing. Web service method could certainly take a
custom class as argument, populated with data from the "record" or
array of records.

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke

"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
> Hi
>
> Is it possible to pass a whole record to a webmethod? How?
>
> Thanks
>
> Regards
>



Dec 27 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Sahil Malik [MVP] | last post: by
3 posts views Thread by Paul Michaud | last post: by
22 posts views Thread by Arne | last post: by
6 posts views Thread by nickname | last post: by
8 posts views Thread by =?Utf-8?B?UmF2aQ==?= | last post: by
1 post views Thread by Morten71 | last post: by
7 posts views Thread by =?iso-8859-1?Q?S=F8ren_M._Olesen?= | last post: by
reply views Thread by kermitthefrogpy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.