473,324 Members | 2,400 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Sorry, but I have a dumb question about c# web service

Dumb question about c# web services Posted on: 11/30/2005 12:14:16


Ok guys, here is what I am trying to do or what I need to know.

I am creating a webservice called db_update. This webservice will have a
couple of methods that allow it to make updates to a db.

Now, I am having an issue declaring a web method that I can pass data into.

What is the syntax to declare a web method called insert that I can pass 3
strings into when its called ??
Thanks,

Chris

Nov 30 '05 #1
1 1136
Chris

Its the same syntax as a regular method in a C# class. You just tag
your method using the webmethod attribute.

[WebMethod]
public string insert(string param1, string param2, string param3)
{
//do your db work here.
return "string";
}

Peter Kelcey

Nov 30 '05 #2

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

Similar topics

3
by: MostlyH2O | last post by:
Hi Folks, I'm sorry if this is the wrong place to ask a really newbie question, but I can't seem to get an answer to what seems to be a simple question... What is the difference, with regard...
4
by: Tom Petersen | last post by:
Ok, I'm 99.9999999999999999999% sure there haven't been any code changes, since the date stamps of the code are older than any email 'failures' The email piece quit working using the mail.send. ...
9
by: Coleen | last post by:
I'm using MS .Net Version 7, using VB .Net working on a "simple" web page. All I want to do is display a messagebox. I tried using Messagebox.Show, and get an error that Messagebox has not been...
3
by: ed | last post by:
I've just started working with .Net, so appologize for what is probably a really dumb question. Did Windows XP originally come with the .Net framework installed, and if so which version? ...
6
by: Ian | last post by:
Has anyone else seen the current DB2 ad campaign playing in the current trade rags - "DB2 Won't Abandon You" - with the implication that Oracle is evil because it desupported Oracle 8i last year. ...
8
by: BolineC | last post by:
I am trying to use a timer in a simplistic windows service... In my OnStart method, I declare and initialize the System.Threading.Timer, and set it to fire every 30 seconds. In my callback...
2
by: JD | last post by:
Hello, I'm experiencing a problem that I'm hoping someone might be able to shed some light on. I have an ASP.NET page on a Windows 2000 machine that makes web service calls to a .NET web...
4
by: Ike | last post by:
I know this is a stupid question, but for the life of me I cannot find it in the online docs. If I am running MySQL as a Windows Service, how do I obtain the command line? Thanks, Ike
16
by: CMM | last post by:
Is it me or has anyone noticed that F1 is really dumb in VS2005. Since VB3 I have been able to click F1 on an ambiguous method in code and the IDE automatically determines the type based on the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.