473,414 Members | 1,848 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,414 software developers and data experts.

Web Services and SQL Server

I've written a very basic web service that is used by my PocketPC to add two
numbers together.
It works fine. So next I'm writing a WebService which accesses my SQL Server
and returns
rows appertaining to a specific OrderId.

I have written a stored procedure called spGetConfirmedOrder to which I pass
the OrderId and it
works okay until I need to reference it in my code then it doesn't recognise
it. Is there something
that I'm missing out here do I need to get involde with SOAP and WDSL files?

Regards

Chris
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.663 / Virus Database: 426 - Release Date: 20/04/2004
Nov 20 '05 #1
5 1095
Hi Crose

A webservice works as a service

So in with your program you do something as roughly typed
\\\
dim ws as new myserver.myservice
dim Result = ws.AddInwebservice(1, 2)
///
And in your webservice is a function
\\\
<WebMethod()>
Public Function AddInwebservice(byval a as integer, byval b as integer) as
integer
'get information a from database
'get information b from database
return a+b
End Function
///
And of course set a reference to that WebReference using the solution
explorer

That is basicly all

I hope this helps?

Cor
Nov 20 '05 #2
Cor

Thanks for your reply that's basically what I did with great success in my
first web service. My problem lies with writing a service that drags data
from a SQL Server and calling a stored procedure to get the data. On the Web
examples are in short supply and any query usually brings up lots of
references to XML and SOAP which I'm hoping I'm not going to have to dig
into.

Regards

Chris

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:up**************@TK2MSFTNGP09.phx.gbl...
Hi Crose

A webservice works as a service

So in with your program you do something as roughly typed
\\\
dim ws as new myserver.myservice
dim Result = ws.AddInwebservice(1, 2)
///
And in your webservice is a function
\\\
<WebMethod()>
Public Function AddInwebservice(byval a as integer, byval b as integer) as
integer
'get information a from database
'get information b from database
return a+b
End Function
///
And of course set a reference to that WebReference using the solution
explorer

That is basicly all

I hope this helps?

Cor

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.667 / Virus Database: 429 - Release Date: 23/04/2004
Nov 20 '05 #3
Hi Crose,

I am curious, why do you want that, what benefit do you expect (beside that
I do not know how) to let your SQL Server function as a webservice server?
(That is what I think you want to do).

For me the stored procedure is basicly nothing more than a method to let the
Server acts quicker.
I do as well not know this, however I think that letting the SQL server act
direct on the Internet will not have benefits for the security.

Cor
Nov 20 '05 #4
Cor

In a multi tiered application the use of web services is a very secure m
ethod of
transmitting data. My user application runs on a PocketPC2003 and will need
to access sales data via the web maybe even via GPRS (so I need to keep the
overhead low). I could write the code that the stored procedure uses into
the web service but that would be compiled every time it is called or run
which is a server overhead. So the best way is to call a stored procedure in
SQL Server which has the benefits that I can use the SQL Server Security as
well.

Regards

Chris


"Cor Ligthert" <no**********@planet.nl> wrote in message
news:eZ**************@TK2MSFTNGP12.phx.gbl...
Hi Crose,

I am curious, why do you want that, what benefit do you expect (beside that I do not know how) to let your SQL Server function as a webservice server?
(That is what I think you want to do).

For me the stored procedure is basicly nothing more than a method to let the Server acts quicker.
I do as well not know this, however I think that letting the SQL server act direct on the Internet will not have benefits for the security.

Cor

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.667 / Virus Database: 429 - Release Date: 23/04/2004
Nov 20 '05 #5
Hi Crose,

Are you not talking about just calling a SQL server over the TCP Internet,
for that I would ask it in the adonet group, probably Bill (William B. Ryan)
knows how to handle this because he does this kind of solutions.?

microsoft.public.dotnet.language

I put his name here above because he is here also active

Cor
Nov 20 '05 #6

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

Similar topics

2
by: Michael Hatmaker | last post by:
I have begun experimenting with web services, and I created some simple web services in C# and was able to install them with IIS and create an equally simple C# client to consume them. My next...
8
by: Bill Sonia | last post by:
I've written a Windows Service to send e-mails on events like OnStart, OnStop, OnShutDown using System.Web.Mail. It works for everything but OnShutdown. My guess is that for OnShutDown, once my...
6
by: Dan V. | last post by:
Is there a way to query a remote xml file periodically by not using web services? For Windows and Unix platforms. Is there a cheap software product that I can install on each client and my Windows...
8
by: Woody Splawn | last post by:
I am asking this question here because I asked this question in the Reporting Services Newsgroup and did not get an answer. Does anyone know if Reporting Services is intended to work in a...
3
by: Matt D | last post by:
I've got two web services that use the same data types and that clients will have to consume. I read the msdn article on sharing types...
3
by: Olivier BESSON | last post by:
Hello, I have a web service of my own on a server (vb.net). I must declare it with SoapRpcMethod to be used with JAVA. This is a simple exemple method of my vb source : ...
1
by: rmk | last post by:
How can I get the 2000 and 2005 versions of SQL Server Reporting Services both working on my development laptop ????? I have ASP.NET 1.1 and 2.0 installed on my laptop. I have Visual Studio...
3
by: Blasting Cap | last post by:
I'm using VS 2005, SQL 2005 reporting services. SQL reporting services is working, and I have it both on my local computer, as well as on a server. I've created a report in the SQL Business...
0
by: fperri | last post by:
Hi, I am trying to configure reporting services which I just added to an already existing installation of SQL Server 2005. When I am in the reporting services configuration manager and I am trying...
4
by: aj | last post by:
SQL Server 205 SP2 64-bit, Windows Server 2003 R2 64-bit I have SQLS happily running, but when I run Configuration Manager (I need to change MSSQLSERVER startup param properties), the only entry...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...

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.