473,837 Members | 1,492 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1637
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.in fovis.co.uk> wrote in message
news:%2******** ********@TK2MSF TNGP14.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****@aspalli ance.com> wrote in message
news:et******** ******@TK2MSFTN GP14.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.in fovis.co.uk> wrote in message
news:%2******** ********@TK2MSF TNGP14.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.in fovis.co.uk> wrote in message
news:OX******** ******@tk2msftn gp13.phx.gbl...
Can they take a dataset as parameter?

Thanks

"Teemu Keiski" <jo****@aspalli ance.com> wrote in message
news:et******** ******@TK2MSFTN GP14.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.in fovis.co.uk> wrote in message
news:%2******** ********@TK2MSF TNGP14.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(ByVa l Events As Data.DataSet)

Thanks

Regards

"Marina" <so*****@nospam .com> wrote in message
news:%2******** ********@TK2MSF TNGP11.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.in fovis.co.uk> wrote in message
news:OX******** ******@tk2msftn gp13.phx.gbl...
Can they take a dataset as parameter?

Thanks

"Teemu Keiski" <jo****@aspalli ance.com> wrote in message
news:et******** ******@TK2MSFTN GP14.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.in fovis.co.uk> wrote in message
news:%2******** ********@TK2MSF TNGP14.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.in fovis.co.uk> wrote in message
news:eT******** ******@TK2MSFTN GP15.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(ByVa l Events As Data.DataSet)

Thanks

Regards

"Marina" <so*****@nospam .com> wrote in message
news:%2******** ********@TK2MSF TNGP11.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.in fovis.co.uk> wrote in message
news:OX******** ******@tk2msftn gp13.phx.gbl...
Can they take a dataset as parameter?

Thanks

"Teemu Keiski" <jo****@aspalli ance.com> wrote in message
news:et******** ******@TK2MSFTN GP14.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.in fovis.co.uk> wrote in message
news:%2******** ********@TK2MSF TNGP14.phx.gbl. ..
> Hi
>
> Is it possible to pass a whole record to a webmethod? How?
>
> Thanks
>
> Regards
>



Dec 27 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2747
by: Sahil Malik [MVP] | last post by:
Okay so now I understand (surprised though) - that WebServices can indeed pass ByRef/ref parameters. All I have to do is mark an integer parameter of a WebMethod as "ref". Funnily enough, this is also supported per the SOAP Spec, and from what I understand, .NET's implementation of WebServices, donot follow the standard, but instead shimmy this behavior by working with a strict request/response WSDL. So my question is - If I mark an int...
5
3517
by: James Wong | last post by:
Dear all, I've a web service function and it contains a parameter in System.Text.Encoding. I found that the data type of this parameter in caller application becomes MyWebSvcName.Encoding (where "MyWebSvcName" is the name of my web service). I don't know how to assign value to this parameter. (I'm using VB.NET 2003.) Here are some sample codes:
3
3165
by: Paul Michaud | last post by:
Consider the following: Class A { .... } Class B:A { ....
22
25614
by: Arne | last post by:
How do I pass a dataset to a webservices? I need to submit a shoppingcart from a pocket PC to a webservice. What is the right datatype? II have tried dataset as a datatype, but I can't get it to compile. <WebMethod()> _ Public Function VerifySku(ByVal skus As XmlDataDocument) As DataSet Test program : Dim cartSet As DataSet cartSet = ws.VerifySku(cartSet)
6
13826
by: nickname | last post by:
I want to pass some xml to a web service method, the xml will confirm to a defined schema. Lets say the schema is defined as: <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="books"> <xs:complexType> <xs:sequence> <xs:element maxOccurs="unbounded" name="book"> <xs:complexType>
8
8905
by: =?Utf-8?B?UmF2aQ==?= | last post by:
Hi, I'm trying to pass values of different data-types to a web-service. I thought it would be easier to box these values and pass them as a System.object parameter, like public void webmethod1(object a) where a can be of type string, DateTime, float, etc..
1
1186
by: Morten71 | last post by:
I'm fairly new to web services in .net/vs. I'm wondering about a few ws things: - should I create a new ws project for every ws? - how do I best ensure that only selected consumers can use a ws? - how do I best pass back receipts to the ws consumer? Have googled the above, but with little success. Hope someone can kick start me/point to a authoritative resource.
7
10149
by: =?iso-8859-1?Q?S=F8ren_M._Olesen?= | last post by:
Hi How do I pass a complex type to a webservice?? What I have is a Class 'MyComplexClass' which lives in it's own dll/namespace. I'd like to pass this class to my webmethod: <WebMethod()_ Public Sub MyMethod(ByVal arg As MyComplexClass) End Sub
1
2031
by: chaitanya02 | last post by:
Hello All, Can anyone help me in passing a Datetime parameter to a webmethod, please? *declaration datetime datetime1; webmethod(out string datetime1); is it the right way of declaring a datetime variable..
0
9843
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10882
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10275
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9407
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7005
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5670
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5851
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4045
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3126
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.